rsnext/test/integration/dynamic-routing/pages/_app.js
Jiachi Liu f21a9dd5cb
Fix pageProps is missing when route changes (#38178)
## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`


Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2022-06-30 18:13:07 +00:00

8 lines
257 B
JavaScript

export default function App({ Component, pageProps }) {
if (!pageProps || typeof pageProps !== 'object') {
throw new Error(
`Invariant: received invalid pageProps in _app, received ${pageProps}`
)
}
return <Component {...pageProps} />
}