DEV Community

Discussion on: ReactJS -- If it is setting a state with the same value, will the component be re-rendered?

Collapse
 
smac89 profile image
smac89

The example given there is not correctly done.

Here is an updated example which uses useEffect and also shows the last time the component was updated

stackblitz.com/edit/react-xeofau

Collapse
 
fidaay profile image
fidaay

That's the same thing lol