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

How to access router inside a dynamic module? #336

Open
corey-cosman opened this issue Dec 23, 2020 · 1 comment
Open

How to access router inside a dynamic module? #336

corey-cosman opened this issue Dec 23, 2020 · 1 comment

Comments

@corey-cosman
Copy link

corey-cosman commented Dec 23, 2020

apologies for asking this here if I should have asked it somewhere else, didn't find much on the topic. Importing the router works, but it causes strange bugs. Any help is greatly appreciated. Thanks in advance!

@corey-cosman
Copy link
Author

it seems the best solution is to deal with the router on the component and not in store, while using store for tracking state changes that can be read to determine router actions: as per:

"Don’t pass your router into vuex. Use reactivity of vuex in your component to trigger the change."

https://www.reddit.com/r/Nuxt/comments/iwx6kq/how_to_use_thisrouterpush_inside_vuex/

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

1 participant