Skip to content
Discussion options

You must be logged in to vote

I have the same question. I suspect this is because of component navigation guards

  • Async components probably don't properly trigger them at all
  • RouterView will render async component immediately (and change the URL), but for dynamic component, it would first call the navigation guard, which can even can even cancel the navigation.

But I'm just guessing, maybe there's some other reason. It'd be nice to know for sure, because using just dynamic imports has some serious downsides, namely that it introduces noticable delay when you click a link. We would like to use async component to avoid that (or some equivalent of it) and I want to know what are the pitfalls we should be aware of.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@posva
Comment options

Answer selected by posva
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants