-
-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dfc1be6
commit fc056a9
Showing
6 changed files
with
84 additions
and
0 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,25 @@ | ||
import React from 'react'; | ||
import {NextPage} from 'next'; | ||
import Link from 'next/link'; | ||
import {State} from '../components/reducer'; | ||
import {wrapper} from '../components/store'; | ||
|
||
const PropsPage: NextPage<State> = props => { | ||
return ( | ||
<div className="pageProps"> | ||
<p>Using Next.js default prop in a wrapped component.</p> | ||
<pre>{JSON.stringify(props)}</pre> | ||
<nav> | ||
<Link href="/"> | ||
<a>Navigate to index</a> | ||
</Link> | ||
</nav> | ||
</div> | ||
); | ||
}; | ||
|
||
PropsPage.getInitialProps = wrapper.getInitialPageProps(store => async () => ({ | ||
prop: 'foo', | ||
})); | ||
|
||
export default PropsPage; |
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,25 @@ | ||
import React from 'react'; | ||
import {NextPage} from 'next'; | ||
import Link from 'next/link'; | ||
import {State} from '../components/reducer'; | ||
import {wrapper} from '../components/store'; | ||
|
||
const PropsPage: NextPage<State> = props => { | ||
return ( | ||
<div className="pageProps"> | ||
<p>Using Next.js default prop in a wrapped component.</p> | ||
<pre>{JSON.stringify(props)}</pre> | ||
<nav> | ||
<Link href="/"> | ||
<a>Navigate to index</a> | ||
</Link> | ||
</nav> | ||
</div> | ||
); | ||
}; | ||
|
||
PropsPage.getInitialProps = wrapper.getInitialPageProps(store => async () => ({ | ||
prop: 'foo', | ||
})); | ||
|
||
export default PropsPage; |
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
Hi)
Remove console.log, please)