Today we'll learn about the widely used hooks in React. First, let me tell you the need for hooks. As we all know React has functional and class components. Previously, the functional components were only used to render the data but didn't consist of...
deepansh946.hashnode.dev4 min read
Well explained. Now useReducer hook make sense to me.
Very good read! I am pretty new to react. I was a little confused on the first couple of lines.
const [number, setNumber] = useState(0);
Were number and setNumber defined someplace?
Why do you pass 0 to useState? Then you pass true to it here?
const [isEven, toggleEven] = useState(true);
I look forward to reading more!
Mauricio Neftali Melendez Macias
Front-End developer
Buena explicación, creo que solo me falta comprender mejor el hook useReducer👍