docs: add warning that pages need single root element (#1070)

This commit is contained in:
Daniel Roe 2021-10-18 09:10:09 +01:00 committed by GitHub
parent 61518a972f
commit 0591350f5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,10 @@ The `pages/` directory is optional, meaning that if you only use [app.vue](/docs
Nuxt will automatically integrate [Vue Router](https://next.router.vuejs.org/) and map `pages/` directory into the routes of your application.
::alert{type=warning}
Unlike components, your pages must have a single root element to allow Nuxt to apply route transitions between pages.
::
## Dynamic Routes
If you place anything within square brackets, it will be turned into a [dynamic route](https://next.router.vuejs.org/guide/essentials/dynamic-matching.html) parameter. You can mix and match multiple parameters and even non-dynamic text within a file name or directory.