|
|
|
|
|
by azangru
1179 days ago
|
|
> That is literally what useEffect is for! No, sorry; for useEffect to fire, a prop or a state needs to change; which means that the component is going to re-render. My point is that sometimes we want to observe properties passed to the component for side-effect purposes without re-rendering the component. > Functional programmers believe in minimizing side effects. In order to do something — anything — in the real world, we need side effects. Even Haskellers know this :-) |
|
> In order to do something — anything — in the real world, we need side effects. Even Haskellers know this :-)
Hence the use of the word "minimize"