1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

added warning to readme about nesting of meta tags inside of <Head> (#6068)

This commit is contained in:
fabb 2019-01-16 10:57:37 +01:00 committed by Tim Neutkens
parent aa474017d7
commit 6c5152538f

View file

@ -277,6 +277,8 @@ In this case only the second `<meta name="viewport" />` is rendered.
_Note: The contents of `<head>` get cleared upon unmounting the component, so make sure each page completely defines what it needs in `<head>`, without making assumptions about what other pages added_
_Note: `<title>` and `<meta>` elements need to be contained as **direct** children of the `<Head>` element, or wrapped into maximum one level of `<React.Fragment>`, otherwise the metatags won't be correctly picked up on clientside navigation._
### Fetching data and component lifecycle
<details>