Category "reactjs"

update objects in array with useState (reactJS)

Go to the end of this question for the solution that worked for me! i'm currently making my own chess game and i want to check if a position already occurred 3

How to add a comma in array.map after every element except last element in React JSX

How can I add a trailing comma after every element of an array for making a list like: INV, INV, INV, INV Note that the last element doesn't have a trailing c

React project crashes with many allocation failures on Heroku but runs on local dev

My React calendar app works well on a local development build but it gives many allocation failures when it's deployed to Heroku. Here is the error from the Her

React Apollo Link - How to forward operation after a promise has resolved?

So I figured out how to setup a middleware to handle my auth tokens, as well as getting new ones, if need be. The problem is that, there is an edge case here wh

There appears to be trouble with the npm registry (returned undefined). Retrying

I'm trying to install dependencies in my project but when I run yarn install I get the following error [2/5] 🔍 Resolving packages... info There appears

How to update atoms (state) in Recoil.js outside components ? (React)

I'm new to Recoil.js, I have the following atom and selector for the signed-in user in the app: const signedInUserAtom = atom<SignedInUser | null>({ k

Embed react component into website without Iframes

my company wants to create a react component which is going to render a google maps frame, a search field and a result list. Basically to search, see results an

React: The `value` prop supplied to <select> must be a scalar value if `multiple` is false

I am getting this warning: Warning: The `value` prop supplied to <select> must be a scalar value if `multiple` is false. Check the render method of `Cont

Read Store's Initial State in Redux Reducer

Initial state in a Redux app can be set in two ways: pass it as the second argument to createStore (docs link) pass it as the first argument to your (sub-)redu

React: Where To Extend Object Prototype

I created a pure React application using create-react-app. I would like to extend the String class and use it in one or more components. For example: String.pr

Intellisense for Jest not working in VS code

Edit: Run npm install @types/jest To fix Just trying to type it() and the auto suggestion is isTag I've tried adding a jsconfig.json { "compilerOptions": {

How can I programmatically set the user details for Launch Darkly in my react app

I am wrapping my App.js file in the withLDProvider component and I want to know how I can set the user information from inside of my App function. Let's say fo

Material-UI Can't resolve '@material-ui/core/styles/createMuiTheme

I know people have posted similar question on StackOverflow, but nothing worked for me, the errors are not the same nor are the fixes, so I am creating a new po

Hello, I am using antd treeselect in my react js project . and when i am clicking on parent node child options are not appearing

const treeData = [ { title: '0-1', value: '0-1', key: '0-1', }, { title: '0-2', value: '0-2', key: '0-2', chil

react-draft-wysiwyg Default Value Style doesn't load

I am not able to load default value style in React-draft-wysiwyg . Codesandbox Link: Editor what I tried ? I am using react-draft-wysiwyg library for editor and

React Three Fiber OBJLoader conflicts witth @types/three

I am following the official React Three Fiber Docs here. I am trying to load .obj files into my scene, using this article: react-three-fiber docs: loading obj m

TypeError _this2.flipBook.getPageFlip is not a function

I used to use react-pageflip on Reactjs exactly like the code below and it worked fine. When I copied the same component, I got this error in the nextjs project

mixed payload data fields in react signup form

I am really new to react i created a sign up form but when posting data values are mixed I created onchange and onsubmit to track changes and submit the to back

TextInput style is not updating if there is an emoji in text value

TextInput style is not updating if there is an emoji in text value however without emoji the text value color is updating. I would like to know why this issue i

Nextjs global api calls

I am developing react based web application using NEXT.js,. As specified in NEXT.js, documentation to fetch the data before page loads, i am putting required ac