Skip to content

Recommend to not use the auto-import useRoute()#512

Description

@mszeftel

馃摎 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

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 nuxt/nuxt#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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions