Category "reactjs"

Why "clientSecret is not a recognized parameter" in stripe

Im confused. The Stripe Docs to integrate stripe elements in react said here: const options = { // passing the client secret obtained from the server clientSe

How to use framer motion animation with swiper.js (React)?

So the animations are only occurring during the initial page reload. I want the animations to execute every time I scroll down to another page. How do I use rea

Use reselect selector with parameters

How do I pass additional parameters to combined selectors? I am trying to • Get data • Filter data • Add custom value to my data set / group d

How to specify (optional) default props with TypeScript for stateless, functional React components?

I'm trying to create a stateless React component with optional props and defaultProps in Typescript (for a React Native project). This is trivial with vanilla J

Newbie- API to get Ethereum's latest blocks

I am looking for an ethereum api to get the N latest blocks. I will use javascript (react) to make the requests. I have looked into https://etherscan.io/apis#b

react-router-dom <Routes> and <BrowserRouter> errors

I am using react-router-dom and am facing an issue with using <Routes>: Here is my index.tsx file: import React from 'react'; import ReactDOM from 'react-

how to listen for route change in react-router-dom v6

am trying to migrate the old react router dom code to v6 and I want to know how to listen for route change, I am now using useHistory const history = useHistory

Detect when mobx observable has changed

Is it possible to detect when an observable changes in any way? For instance, say you have this: @observable myObject = [{id: 1, name: 'apples'}, {id: 2, name

How to pass a an argument to getByText in react Testing Library?

Currently I'm doing this getByText(/SomeText/i); But I want to make a function and pass some text as an argument by first storing it in a variable. I tried doi

How to manually trigger click event in ReactJS?

How can I manually trigger a click event in ReactJS? When a user clicks on element1, I want to automatically trigger a click on the input tag. <div classNam

Problem chrome content security policy react extension manifest

I created a very simple extension chrome but I have a problem I can not fix it, the problem is of Content Security Policy of google chrome please I need help fo

Is it possible to delay Fade's transition?

Goal: I want Fade's transition to happen after a certain time has passed (ex: 4000 milliseconds). Here is a fragment of my code: <Fade in timeout={{ enter:

Semantic UI React - Table - Make whole row selectable and link somewhere

I have tried making a row selectable but I want to be able to click anywhere inside the row and have it link somewhere. Each row should have a different link.

Camera Preview in Expo is Distorted

I'm using Camera that comes from expo package and I'm having trouble with camera preview distortion. The preview makes images appear wider in landscape view and

Semantic UI React - Table - Make whole row selectable and link somewhere

I have tried making a row selectable but I want to be able to click anywhere inside the row and have it link somewhere. Each row should have a different link.

EventEmitter.removeListener('keyboardDidHide', ...): Method has been deprecated

Please help me, I don't know what this warning is. I'm trying to render a chat room with chat messages between two users from Cloud Firestore database. This war

Is it possible to map only a portion of an array? (Array.map())

I am building a project using React.js as a front-end framework. On one particular page I am displaying a full data set to the user. I have an Array which conta

Cant load a react app after starting server

(node:13176) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewa

Cancel drag or disable reorder

Is there a way to cancel drop action of react-beautiful-dnd's Draggable object? I have a list of items with one item to be always at last position. I want to

How to check that an ipfs hash is an image/video/.. in React Js?

I need to use the ipfs hash to find out whether the file is an image or a video so that i can use it to either show the image/play the video. Couldn't find any