Skip to content

onMounted hook called twice during pageTransition with out-in mode #27442

@alekseyf

Description

@alekseyf

Environment

  • Operating System: Darwin
  • Node Version: v20.9.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.10.5
  • Builder: -
  • User Config: devtools, app
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/nuxt-transition-out-in-bug

Describe the bug

When navigating from the Home page to the Test page, the onMounted hook on the Test page is triggered twice. This behavior occurs only when the pageTransition mode is set to out-in in the Nuxt configuration and the Test page contains await useAsyncData.

Additional context

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions