I like using hooks. I don't like too much using classes. I have learned React from the beginning using hooks, not classes. The most interesting thing about useEffect is how it can pass from two renders to infinite loop changing only a little bit the second dependency parameter. Or for example, if you use useReducer and dispatch an action, you must know that the effect of this dispatch will not be visible until the next render, so you have to put your code inside useEffect in order to take account for this dispatch. So you end up using a lot of useEffect. Sometimes it's difficult to tune the second argument for useEffect. As a project I made myself the minesweeper game using hooks. It was cool to do that and I learned quite a lot. Or sometimes doing little test projects with a lot of console.logs to see what is going on with renders. With time we can master it!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I like using hooks. I don't like too much using classes. I have learned React from the beginning using hooks, not classes. The most interesting thing about
useEffect
is how it can pass from two renders to infinite loop changing only a little bit the second dependency parameter. Or for example, if you useuseReducer
anddispatch
an action, you must know that the effect of thisdispatch
will not be visible until the next render, so you have to put your code insideuseEffect
in order to take account for thisdispatch
. So you end up using a lot ofuseEffect
. Sometimes it's difficult to tune the second argument foruseEffect
. As a project I made myself the minesweeper game using hooks. It was cool to do that and I learned quite a lot. Or sometimes doing little test projects with a lot ofconsole.log
s to see what is going on with renders. With time we can master it!