Skip to content

Commit

Permalink
Update MyApp example in upgrading from 5->6 to use new withRedux API (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
robbieaverill committed May 9, 2020
1 parent 4d4f9fb commit 2062667
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -708,13 +708,11 @@ If your project was using Next.js 5 and Next Redux Wrapper 1.x these instruction
```js
// pages/_app.js
import React from 'react'
import {Provider} from "react-redux";
import App from "next/app";
import withRedux from "next-redux-wrapper";
import {makeStore} from "../components/store";
export default withRedux(makeStore, {debug: true})(class MyApp extends App {
import {Provider} from 'react-redux';
import App from 'next/app';
import {wrapper} from '../store';
class MyApp extends App {
static async getInitialProps({Component, ctx}) {
return {
pageProps: {
Expand All @@ -731,7 +729,9 @@ If your project was using Next.js 5 and Next Redux Wrapper 1.x these instruction
);
}
});
}
export default wrapper.withRedux(MyApp);
```

4. Follow [Next.js 6 upgrade instructions](https://github.com/zeit/next.js/issues/4239) for all your components
Expand Down

0 comments on commit 2062667

Please sign in to comment.