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

router-view rendering stops working after inner contents are replaced #3033

Closed
gumho opened this issue Nov 21, 2019 · 1 comment
Closed

router-view rendering stops working after inner contents are replaced #3033

gumho opened this issue Nov 21, 2019 · 1 comment

Comments

@gumho
Copy link

@gumho gumho commented Nov 21, 2019

Version

3.1.3

Reproduction link

https://codepen.io/gumho/pen/oNNVYyN

Steps to reproduce

Using versions:
Vue JS 2.6.10
Vue-router 3.1.3

Steps:

  1. Open codepen link (https://codepen.io/gumho/pen/oNNVYyN)
  2. First click on "vuejs twitter" link
  3. After router-view is rendered, click on "vuerouter link"

What is expected?

After step #3 is performed, the router-view should render the content from the 2nd router-link.

What is actually happening?

While it is clear that the route in the URL browser bar changes, the router-view is not updated with the contents (the updated template) from the "vuerouter twitter" router-link.


After router-link is clicked, "twttr.widgets.load()" is called [1] which is supposed to replace all instances of ... with an iframe. For some reason this is disrupting the ability for the 2nd router-link to update the router-view with its template ().

[1] https://developer.twitter.com/en/docs/twitter-for-websites/javascript-api/guides/scripting-loading-and-initialization

@gumho

This comment has been minimized.

Copy link
Author

@gumho gumho commented Nov 21, 2019

Perhaps this is due to https://router.vuejs.org/guide/essentials/dynamic-matching.html#reacting-to-params-changes? If so, is there any way to force destroy and re-create the component?

@gumho gumho closed this Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.