-
-
Couldn't load subscription status.
- Fork 10.7k
Description
Version
6.0.0-beta.0
Test Case
I create a pure component, there is no reason to execute again when i want to navigate to other page using useNavigate , I think useNavigate hook cause waste rendering on pure components, when using useHistory hook of last version(5) it doesn't have this behavior
I have a question here for more detail
Am i wrong or something changed?
https://codesandbox.io/s/dawn-wave-cy31r?file=/src/App.js
Steps to reproduce
Create pure component
Use useNavigate hook inside it
Expected Behavior
Navigate to other page should not cause execute of pure components when props are not changed
Actual Behavior
Navigate to other page in pure component causes waste rendering, component execute again even when props are same