Category "reactjs"

switching the audio and video devices while recording is on in reactjs

I am creating a demo application in which user can record a video using ReactJs. I am able get the list of devices, and record the video. I am stuck and couldn'

Property 'getAllByRole' does not exist on type 'Screen'. TS2339

I'm working on a web application in which the front end is built using ReactJs. When I run the code, I'm getting this error as mentioned. TypeScript error in M

How to get id or information of table in filterDropdown in antd

So I am using antdesign table and I have three different tables based on the status(status: approved/pending/rejected) of the data but the columns used in these

Can a React usestate update be nested in another useState functional update?

There are n items the user can vote on. There are two React states: votes is an array of the user's votes on every item. const [votes, setVotes] = useState({});

React - How to display only one instance of a dropdown component

I have a custom dropdown component that contains different items depending on the caller, its connected to a state that toggles its visibility, to be able to re

Protected route with react router v6

What is correct way to write a ProtectedRoute with new version 6 of react-router? I wrote this one, but it's not a route const PrivateRoute = ({ component: Com

Warning: Failed prop type: The prop `justify` of `ForwardRef(Grid)` is deprecated. Use `justifyContent` instead, the prop was renamed

Can someone help me in solving this error. I am unable to rectify this error. this is what i got in the browser's console const Cart = ({ cart }) => { co

How to fix Next.js Vercel deployment module not found error

My next.js app works on my machine and was working when deployed on Vercel but now it fails when building on Vercel with the following error: I've tried delet

React ref is only updating one instance

Got an interesting problem withs refs. I'm mapping over a component and rendering it multiple times and passing a ref to each one const ref = useRef() {data.ma

Entity adapter getSelectors method generates "Cannot read property 'map' of undefined" error

I am trying to use createEntityAdapter from reduxjs/toolkit to generate selectors automatically. I have created a "select all" selector successfully using creat

how to filter array to only pick last changed value of same id of object in react

This is the function i run on OnChange in AvField let selectedFieldArray = [] const templateValue = (e) => { const fieldObject = { "id": e.target.

PWA with React: Trying to create a object that updates every second and is accessible for many components

I'm currently working on a PWA build with React. I'm looking for a way to create one object which contains information like the current time (incl. seconds), cu

Cannot update a component while rendering a different component warning

I am getting this warning in react: index.js:1 Warning: Cannot update a component (`ConnectFunction`) while rendering a different component (`Register`). To l

Modal always re-rendering when typing in input for React-Bootstrap-Table2

I'm trying to implement an 'Edit Category' modal that can edit the current selected row in React-Bootstrap-Table2. However, when I tried to type in Category Des

How disable validation Formik when clicking cancel button?

I'm using Material-ui with Formik and Yup for form validation, but I'm having trouble disabling form validation when clicking the cancel button. Tried using for

react-i18next:: You will need to pass in an i18next instance by using initReactI18next warning thrown in Jest unit test

I am using react-i18next in my app to great effect but when I run the unit tests against my component: const OptionList = ({ definition, name, status = EM

react-bootstrap-table-toolkit Search Import Error

I wanted to use React Bootstrap Table in my project and I'm getting the following error. Uncaught ReferenceError: arguments is not defined at Object../node_mod

How to pass row data to a child component created into a format function

I have a react-bootstrap table with column defined like this: const columns = [ ... { dataField: "d", text: "Actions", formatter: ac

React-moralis, function useMoralisQuery, searching item by currentPatientWalletId address

I'm trying to query patient's consultation data via currentPatientWalletId which is a variable am passing to the useMoralisQuery hook,butit cant.bt once i hard

Set new intiial SlateJS editor value with React onEffect

How to easily set entire SlateJS editor value using React onEffect hook? The initial editor value is set when creating the useState hook, however, I want to set