Category "reactjs"

changing video source in useEffect based on language change

I'm trying to play different videos on language change. however the same video always plays, useEffect(() => { console.log("language changed: ", i18n.langua

Firebase RecaptchaVerifier.clear() has no effect

I have react web app where I want to implement phone auth. I have initialized recaptchaVerifier based on docs and examples. However if I want to submit the for

.mongo' is not recognized as an internal or external command, operable program or batch file

I have installed mongo db. Then when i tried to execute .mongo or mongo in command prompt. It's showing this error: .mongo' is not recognized as an internal

React: jsx in a variable vs a function vs a separate component

For rendering smaller components/jsx within a bigger component, there are multiple approaches that one can follow. For example, consider this: Method 1: functio

React Routing Not wokring inside Wordpress - [WPengine]

I've a Wordpress site hosted in WPEngine. I'm running a react application inside Wordpress using ReactPress plugin. https://####.wpengine.com/rpressapp/ - this

Can´t fetch data from laravel api by react JS - status of 419 (unknown status), postman working

I am trying to get data from laravel api by fetching it. In postman it`s working even with authorization with sanctum. When I fetch with post method it gives: F

AssertionError: expected [Function] to equal 'EthSwap Instant Exchange'

I am doing a tutorial on the web and I ran into an error while trying to run a truffle test. I am not sure where I am going wrong or what to do in this event. C

Filtering render functions from CodeClimate method-lines check

We're adding CodeClimate to a project and running into a lot of method-lines errors for the render functions in our React components, example:- Function render

Delaying Intercept responses in Cypress

I am writing cypress tests, and I want to test a feature of our program which will display data as it begins to appear. This could be a list with several hundre

Why my nextjs component is rendering twice?

This is a component that render data from firebase storage and make it listed. What the function has to do is set the videos extracted from firebase storage to

Error: Hydration failed because the initial UI does not match what was rendered on the server with useSession() and react-bootstrap

I am using next.js, react18 and next-auth. I have a login component that checks the session and displays a login or logout link, depending on you are logged in

Error obtain data with React and Solidity

When call in my front (React) My code: const checkAllowance = await contract.GetAllowance.call({ from: account }).catch((e

How to ignore typescript errors when compile by webpack production mode

environment webpack 4.41.2 typescript 3.7.2 problem When I compile files by webpack development mode, there is no problem. But when I compile by production

Its instance type 'BrowserRouter' is not a valid JSX element

I work on a project developed in React + coreui that has always worked perfectly. However, in the last week, I had an inexplicable problem when deploying a modi

React Auto Complete Element along with options to add value to the list if not present

i have to create an autocomplete react component. Initially there must be 5 autocomplete fields. I set a state as an array of 5 input elements like this.state

React .map not re-rendering

I'm building a sorting algorithm visualizer, and in my return, I'm creating divs to represent vertical bars, in animatedBubbleSort() I'm swapping values in the

How to verify the token and get score using react-google-recaptcha-v3?

I'm using the library react-google-recaptcha-v3 in order to integrate reCAPTCHA v3 into my React application, which also uses Next. There's the following exampl

How to mock react custom hook returned value?

Here is my custom hook: export function useClientRect() { const [scrollH, setScrollH] = useState(0); const [clientH, setClientH] = useState(0); c

How to fix React Apex Chart initial mount delay?

I am using React Apex chart library in my project.I've figured that the library charts have a small delay before rendering on initial mount. This issue harms th

How to add dynamically created input field values to a use state array?

Continuing troubleshooting from Adding data to array using UseState onChange Hi, i am trying to make a button, that adds a new input field, then, when i click a