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

render called twice whit dynamic import #10902

Closed
wowissu opened this issue Dec 6, 2019 · 2 comments
Closed

render called twice whit dynamic import #10902

wowissu opened this issue Dec 6, 2019 · 2 comments

Comments

@wowissu
Copy link

wowissu commented Dec 6, 2019

Version

2.6.10

Reproduction link

https://codesandbox.io/s/rendercalledtwice-rfrbt

Steps to reproduce

I want Vue can render the template by follow the json file which I defined.
so I start trying trough by render methods with dynamic import component,
then seen this happen. it show the same template double times when I using the ssr mode
so I try to reproduction it at spa mode and it still called twice even thought it looks fine at spa mode

What is expected?

render only called once even using dynamic import

What is actually happening?

it called twice
trouble with double template in ssr mode

@posva
Copy link
Member

posva commented Dec 6, 2019

This is expected, it renders once and then again once the dynamic component is loaded. This allows partially rendering a template, it's a feature.

@posva posva closed this as completed Dec 6, 2019
@wowissu
Copy link
Author

wowissu commented Dec 6, 2019

it render once on server side
and then twice on client side
total is three times

This is expected, it renders once and then again once the dynamic component is loaded. This allows partially rendering a template, it's a feature.

oh ! I understand what you mean for now. but is any possible to discriminate between render ?

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

No branches or pull requests

2 participants