ionic icon indicating copy to clipboard operation
ionic copied to clipboard

Recommend to not use the auto-import useRoute()

Open mszeftel opened this issue 1 year ago • 1 comments

📚 Is your documentation request related to a problem?

This is related to the fact that the auto-import useRoute() seems to rely on the use of <NuxtPage> auto-imported useRoute() from nuxt requires use of <NuxtPage>

This gives sometimes old paths and empty params when navigating to a route in the ionix/nuxt app.

From the docs page, under Route Parameters

When accessing route parameters, useRoute() should continue to be used, just like regular Nuxt.

This is not working for me, because of https://github.com/nuxt/nuxt/issues/14595

But using import { useRoute } from 'vue-router'; fixes the issue.

🔍 Where should you find it?

https://ionic.nuxtjs.org/overview/routing

ℹ️ Additional context

No response

mszeftel avatar Jan 25 '24 14:01 mszeftel

I believe this already exists under the Watchouts section. https://ionic.nuxtjs.org/get-started/watch-outs

Andr9651 avatar May 24 '24 06:05 Andr9651