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

Single File Component Children not updating #108

Closed
jan-thoma opened this issue May 8, 2019 · 3 comments
Closed

Single File Component Children not updating #108

jan-thoma opened this issue May 8, 2019 · 3 comments

Comments

@jan-thoma
Copy link

Steps to reproduce:

  • Create a new new project with Vue-CLI3 with router and i18n
  • Enable single file component Support
  • Add to parent single file component which contains the vue-router outlet
  • Add a watcher for '$18n.locale' to child component
  • Update locale
  • Nothing happens
@tikiatua
Copy link
Member

tikiatua commented May 8, 2019

Dear @jan-thoma

Thank you for reporting this. For reactive updates you should watch the state directly. I.e. the locale property in the i18n module in the store.

The properties on the $i18n object are regular functions and not reactive properties.

@jan-thoma
Copy link
Author

To further describe this, even the {{ $t('string') }} is not updating and stays on the default locale in this case. When i store everything in the locale files, it works as excepted.

@tikiatua
Copy link
Member

The setup is actually for vue-i18n and not for vuex-i18n.

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