So I'm trying to use useState in my nextjs app, but as soon as I add in the line of code to initialize useState it throws a popup error with the error message:
I am trying to figure out on how to set a button that can independently be disabled when using the .map function. So I created a state whenever the button is cl
So im using Howler to play background music when my React app is loaded. So I store ID of the instance of Howler(i.e is responsible for background music) using
I have a app that conducts a test and when the currently logged in user passes the test, the app shows a modal telling him that he has passed the test. I want t
I am getting different behaviour depending on whether I am using a boolvalue on with useState, or whether I am using a bool value inside an object with useState
When I edit the form here, I need to show the value in the database. so how can i get this value const dataValue = ndata.filter((obj) => obj._id === dataid )
am writing an app in react native and i got a problem with useState and useEffect hooks. I would like to change increment state value by one every 10 seconds. H
My app has a test sheet, if a user passes the test he is shown a passing screen and then the state is saved using asyncstorage. But the problem here is, let's s
I am using the @material-ui-searchbar to filter data. I'm using the same container for multiple different pages to display the info. When ever I switch between
I'm learning React and starting with handling state in a CRUD form via the useState Hook. Something like this: const [data, setData] = useState({}); where data
I am trying to make a test sheet for user. If he passes the test, he is directed to a pass screen and even after totally closing the app, when that specific use
Link to GitHub I have tried lots of things to try and get multiple dropdowns filtering the data but cannot figure it out, I've deleted some failed attempt so th
We are building a chat app using Firestore and React. Users should be able to up/down-vote each other's messages. We have two Firestore collections: messages: c
const [dammy, setDammy] = useState({ name: "any", status: { "1.0.1": "Successfylly installed", "1.0.2": "Successfylly installed", "1.0.3": "Succ
function deleteTask(id) { const remainingTasks = tasks.filter((task) => id !== task.id); setTasks(remainingTasks); } Ijust want to know in plain english, as
I want to push an 2d array into the end of a state. But somehow, when i log the state every time it changes with a useEffect, i replaces every existing array wi
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({});
I'm new to React and in the assignment I'm working on, I have to show data in a AG Grid table. For that this is how I'm initializing rowData inside useState(),
this code must increase the "count" value gradually from 0 to 600. And each time the "count" value changes it must be logged into the console. But instead, I ge
const [title,setTitle] = useState(""); const titleHandler=e => { setTitle(e.target.value) console.log(title) } Why does this code log