forked from vercel/next.js
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update url prop handling for pages with new data methods (vercel#10653)
* Make sure to show error when url prop is returned for a page * Update test and handle undefined pageProps * Handle empty props * Apply suggestions from code review Co-Authored-By: Tim Neutkens <[email protected]> * Update tests * Update to not add url prop for SSG/SSP pages * Update errsh for reserved prop * Update errsh wording some more * Update tests and to warn instead of error * Update reserved prop warning * Include page in url prop warning Co-authored-by: Tim Neutkens <[email protected]> Co-authored-by: Joe Haddad <[email protected]>
- Loading branch information
1 parent
364b4fe
commit 395714a
Showing
8 changed files
with
152 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Reserved Page Prop | ||
|
||
#### Why This Error Occurred | ||
|
||
In a page's `getInitialProps` a reserved prop was returned. Currently the only reserved page prop is `url` for legacy reasons. | ||
|
||
#### Possible Ways to Fix It | ||
|
||
Change the name of the prop returned from `getInitialProps` to any other name. |
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
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
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
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