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

fix: useRouteBaseName composable does not return function #34

Merged
merged 3 commits into from
Feb 18, 2023

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Feb 18, 2023

Description

This PR is included from #32
Thank @BobbieGoede your contribution

Linked Issues

Linked issue said:

Changes useRouteBaseName composable to return a function which can be used to get the route base name, preventing useRoute and useRouter invocation on every call. More info here See nuxt-modules/i18n#1862

This PR is breaking changes.
Nuxt i18n module must be changed as well.

useRouteBaseName composable to return a function that can be used to get the route base name, not return directly get the route base name.

The reason is that you need a context environment (e.g. setup) in which you can run Vue Composition API such as useRoute internally.

Additional context

@kazupon kazupon changed the title Feat/use route base name composable fix: useRouteBaseName composable does not return function Feb 18, 2023
@kazupon kazupon added feature Includes new features breaking Includes backwards-incompatible fixes labels Feb 18, 2023
@kazupon kazupon merged commit 23b3b0c into main Feb 18, 2023
@kazupon kazupon deleted the feat/use-route-base-name-composable branch February 18, 2023 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Includes backwards-incompatible fixes feature Includes new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants