Skip to content

Suspense doesn't display fallback content and warning is output #560

@seijikohara

Description

@seijikohara

Version

3.0.2

Reproduction link

https://jsfiddle.net/seijikohara/jmw3rpue/

Steps to reproduce

No fallback content is displayed and warning is output.
The version of Vue is 3.0.2.

[Vue warn]: <Suspense> slots expect a single root node.

<router-view v-slot="{ Component }">
  <Suspense>
    <template #default>
      <component :is="Component" />
    </template>
    <template #fallback>
      <span>Loading...</span>
    </template>
  </Suspense>
</router-view>

What is expected?

Show fallback contents until the component of async setup is initialized.

What is actually happening?

No fallback content is displayed and warning is output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions