Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
cd0a1767
Commit
cd0a1767
authored
Dec 18, 2018
by
Erik Nguyen
Committed by
Tim Neutkens
Dec 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change errorCode prop name for clearer explanation of code example (#5914)
parent
bd2dee21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
README.md
packages/next/README.md
+4
-4
No files found.
packages/next/README.md
View file @
cd0a1767
...
@@ -1196,15 +1196,15 @@ import fetch from 'isomorphic-unfetch'
...
@@ -1196,15 +1196,15 @@ import fetch from 'isomorphic-unfetch'
export
default
class
Page
extends
React
.
Component
{
export
default
class
Page
extends
React
.
Component
{
static
async
getInitialProps
()
{
static
async
getInitialProps
()
{
const
res
=
await
fetch
(
'https://api.github.com/repos/zeit/next.js'
)
const
res
=
await
fetch
(
'https://api.github.com/repos/zeit/next.js'
)
const
status
Code
=
res
.
statusCode
>
200
?
res
.
statusCode
:
false
const
error
Code
=
res
.
statusCode
>
200
?
res
.
statusCode
:
false
const
json
=
await
res
.
json
()
const
json
=
await
res
.
json
()
return
{
status
Code
,
stars
:
json
.
stargazers_count
}
return
{
error
Code
,
stars
:
json
.
stargazers_count
}
}
}
render
()
{
render
()
{
if
(
this
.
props
.
status
Code
)
{
if
(
this
.
props
.
error
Code
)
{
return
<
Error
statusCode=
{
this
.
props
.
status
Code
}
/>
return
<
Error
statusCode=
{
this
.
props
.
error
Code
}
/>
}
}
return
(
return
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment