-
Notifications
You must be signed in to change notification settings - Fork 26.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Showing
8 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default function Account() { | ||
return ( | ||
<p id="dynamic" className="title"> | ||
Welcome to a /dynamic/[slug] | ||
</p> | ||
) | ||
} | ||
|
||
export function getServerSideProps() { | ||
return { | ||
props: {}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
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} /> | ||
} |