Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double render when first enter web-app #1120

Closed
Stupidism opened this issue May 24, 2017 · 8 comments
Closed

Double render when first enter web-app #1120

Stupidism opened this issue May 24, 2017 · 8 comments

Comments

@Stupidism
Copy link
Contributor

Stupidism commented May 24, 2017

This may cause confusions for components cares about render times.
I found this bug in my own demo project.

how to reproduce

Click the link above first.
If I enter homepage first and then come to component page, they are rendered once.

image

But if I refresh in component page(or enter component page directly), they are rendered twice.

image

expected

Components should only be rendered once in both situations above

@Stupidism
Copy link
Contributor Author

@shilman I think this happens because the url is updated after first render?

@shilman
Copy link
Member

shilman commented May 27, 2017

@Stupidism Hmm that could be it. Mind testing it out—I'd do it myself but your demo project seems to be offline. If you're right, it shouldn't happen when you navigate directly to the final URL. Please let me know what you find, and if it's due to the redirect then I'd say this isn't actually a bug.

@Stupidism
Copy link
Contributor Author

@shilman Sorry, the above link is updated now.

@shilman
Copy link
Member

shilman commented May 27, 2017

Hmm it looks like the double-render happens even when the URL is not updated?

@Stupidism
Copy link
Contributor Author

@shilman Also, it renders twice when HMR

@Stupidism
Copy link
Contributor Author

Stupidism commented May 29, 2017

@shilman It always calls the render function twice when both first-enter and HMR.

@stale
Copy link

stale bot commented Nov 14, 2017

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 60 days. Thanks!

@stale stale bot added the inactive label Nov 14, 2017
@stale
Copy link

stale bot commented Nov 29, 2017

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants