-
-
Notifications
You must be signed in to change notification settings - Fork 947
Double Renders On Navigate #1825
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We don't memoize your components. We follow React's rendering. Same thing, with the memoization: https://stackblitz.com/edit/github-mg7svm-ed3yqq?file=src%2Froutes%2F__root.tsx |
Getting same double rendering issue in my project
Not able to open this link, i added memoization too, but just want to check it. |
@nimish-gupta can you please open a new issue and provide a minimal complete example by forking one of the examples on stackblitz? |
In case this helps anyone still seeing this issue, I found that having
|
I also had this issue, but it was user error in my case. I was accidentally rendering |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Components are rendered twice when navigating to them. I would expect that a component is only rendered once.
This reproduction code is the file based quickstart example from the website with the following modifications:
Issue originally raised from this discussion.
Your Example Website or App
https://stackblitz.com/edit/github-mg7svm?file=src%2Froutes%2Fabout.tsx
Steps to Reproduce the Bug or Issue
Observe the console output, each component and the root component is re-rendered. Example Output:
Expected behavior
I expected the root component to be rendered once total and the children (home and about) to only be rendered 1 time when they are navigated to.
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: