Skip to content

Commit 530a2a3

Browse files
authored
upgrade next-redux-wrapper to 7.0.2 (#26521)
## Bug - [x] Related issues linked using `fixes #number`: Fixes #26338 - [ ] Integration tests added
1 parent f9795fd commit 530a2a3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

examples/with-redux-wrapper/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"dependencies": {
99
"next": "9.4.1",
10-
"next-redux-wrapper": "^6.0.1",
10+
"next-redux-wrapper": "^7.0.2",
1111
"react": "^17.0.2",
1212
"react-dom": "^17.0.2",
1313
"react-redux": "7.1.3",

examples/with-redux-wrapper/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const Index = (props) => {
1818
return <Page title="Index Page" linkTo="/other" />
1919
}
2020

21-
export const getStaticProps = wrapper.getStaticProps(async ({ store }) => {
21+
export const getStaticProps = wrapper.getStaticProps((store) => () => {
2222
store.dispatch(serverRenderClock(true))
2323
store.dispatch(addCount())
2424
})

examples/with-redux-wrapper/pages/other.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ const Other = (props) => {
1818
return <Page title="Other Page" linkTo="/" />
1919
}
2020

21-
export const getServerSideProps = wrapper.getServerSideProps(
22-
async ({ store }) => {
23-
store.dispatch(serverRenderClock(true))
24-
store.dispatch(addCount())
25-
}
26-
)
21+
export const getServerSideProps = wrapper.getServerSideProps((store) => () => {
22+
store.dispatch(serverRenderClock(true))
23+
store.dispatch(addCount())
24+
})
2725

2826
const mapDispatchToProps = (dispatch) => {
2927
return {

0 commit comments

Comments
 (0)