Category "reactjs"

setting defaultChecked in radio button is not working in react

I need to set the defaultChecked on page load which can later be changed by the user <input ref={(element) => (this['input' + item.key] = element)} na

CORS issues with window.open() and OAuth2

I'm running a site that uses SharedArrayBuffer (ffmpeg wasm) which strictly requires CORS (and/or site isolation), AND a Discord oauth2 workflow. After not look

React router routes don't match location

Unsure why this isn't working? Everything has been imported correctly so am unsure why I get the following error message in the console: No routes matched loca

Need do write unit tests with jest for react app, that uses okta, but getting warning

import { SecureRoute, Security, LoginCallback } from '@okta/okta-react'; import React, { useMemo } from 'react'; import { Route, Switch } from 'react-router-dom

How do I edit an array inside a cell in my React-bootstrap table?

As shown in the link below. I have an array inside a cell, when a click on those cell to edit them, they turns to [object, object] instead of their default valu

Can't change background video on button click

I am trying to change the source url of a video tag when pressing a button, but I don't have any luck. Here is the code: const [bg1, setBg1] = useState(true);

React.js giving TypeError : Cannot read properties of undefined (reading 'length')

<MDBRow className="mt-5"> {tours.length === 0 && ( <MDBTypography className="text-center mb-0" tag="h2"> No T

How do I set a width for the TextAreaAutoSize component in Material-UI?

I can't find any info anywhere on how to change the default width of a TextAreaAutosize component in material-ui. It seems the only choice is to have this litt

React function executes continuously and state keeps refreshing

I have kind of a weird issue in React. I am using the Blitz JS framework along side with Prisma for database stuff. I have a function that queries the database

React-native-rn tailwind doesn't generate tailwind.json

I followed all the steps of installing react-native-rn. Everything worked fine at first, but when I moved input.cssto src/css/input.css,it just generates src/cs

React throws error when using Context. Error: Element type is invalid: expected a string (for built-in components)

Error: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likel

Using the right Accessors for a Key Value Object

This is my first time using a dictionary. I am returning two lists and they are separated by an effective date. The goal is to put each list in its own Datatabl

Using the right Accessors for a Key Value Object

This is my first time using a dictionary. I am returning two lists and they are separated by an effective date. The goal is to put each list in its own Datatabl

React - Drag corner of element to resize contents

I'm working on a feature in my React project where when a user hovers over an element, which could contain an image or just text, a resize button appears in the

React - Drag corner of element to resize contents

I'm working on a feature in my React project where when a user hovers over an element, which could contain an image or just text, a resize button appears in the

Change image onClick in React Js

I'm trying to create a page in my React Js project, with the content on the left side and content's image on the right side. So far, I was able to create a togg

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({});