#reactjs
Read more stories on Hashnode
Articles with this tag
You might want your state hook to be an object. Which is fine, it can absolutely be one. const [state, setState = useState({ language: 'React', ...
I had a problem with updating state in my app, which drove me mad. After creating a simplified version in CodeSandbox, and a lot of Googling I...
This is effectively another way of storing data. The problem Let's say you have a state hook that you define in App, it's used in Child Component 1,...
Custom hooks were something that confused me for a long time. I could use useState happily, but didn't see why you'd use a custom hook or how you'd...
The form Let's say you have a simple form in React with an input and a button. const submitForm = (e) => { e.PreventDefault(); //do something with...
You might have occasion to render your JSX in React only in certain conditions. Like maybe if no props were passed to the function, rather than give...