Skip to content

Tag: reactjs

Props in component are undefined

i have parent component and child component In the console i get the output: {“answerChange”: [Function bound ], “inputChange”: [Function bound ], “props”: {“answer”: “”, “input”: “”}} undefined undefined The functions that I …

Socket io connected users key value array

I’m trying to make a list of connected users using key and value pairs. The key will be the connected user, when I received a message I want to emit this to the receiver and sender (to and from) Now I’m stuck on the part where I want to add the new connected user. How do I add the user

scroll to the top of page in reactjs

I am designing the registration page in Reactjs .and I am doing manual validation. now what I want is after clicking onSubmit, the page should scroll to the top to show all errors in the validation.I tried but failed to achieve this.is there anyone who will help me Answer If you task is to scroll to errors ra…

REACT JS reset integer counter

I have this function that gets data from a service using a fetch api call and waits for the response using async and await. If the response isn’t null, it loads a react component and passes the fetched data to the component, it uses react state to manage data content. Because of the wait, i had to intro…