Skip to content

Commit

Permalink
fix(Documentation): Explicitly mention next-redux-wrapper v5
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoluc committed May 13, 2020
1 parent adc53cb commit 9a42588
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

A drop-in replacement for [next-redux-wrapper](https://github.com/kirill-konshin/next-redux-wrapper) that adds [Redux Persist](https://github.com/rt2zz/redux-persist) with [redux-persist-cookie-storage](https://github.com/abersager/redux-persist-cookie-storage) to the equipment list – configured out of the box.
A drop-in replacement for [next-redux-wrapper v5](https://github.com/kirill-konshin/next-redux-wrapper/tree/5.x) that adds [Redux Persist](https://github.com/rt2zz/redux-persist) with [redux-persist-cookie-storage](https://github.com/abersager/redux-persist-cookie-storage) to the equipment list – configured out of the box.

## Motivation

Expand All @@ -29,9 +29,7 @@ It simply stores the Redux state in a cookie which is – by its nature – sent
Beautiful, now the client's redux state is available to the server during SSR!

You are probably already using (or have heard of) [next-redux-wrapper](https://github.com/kirill-konshin/next-redux-wrapper), an easy-to-use HOC to embed Redux into Next.js projects.
If not, give it a try!

This library is nothing but a drop-in replacement for next-redux-wrapper that adds Redux Persist and redux-persist-cookie-storage – beautifully set up and configured to save you a day (or two – I will not tell how long it took me to get this right :smile:) of work!
This library is nothing but a drop-in replacement for next-redux-wrapper version 5 that adds Redux Persist and redux-persist-cookie-storage – beautifully set up and configured to save you a day (or two – I will not tell how long it took me to get this right :smile:) of work!

## How does it work?

Expand All @@ -45,8 +43,9 @@ Let's get into it!
npm install --save next-redux-cookie-wrapper
```

If you do not have next-redux-wrapper set up, follow their [installation instructions](https://github.com/kirill-konshin/next-redux-wrapper#installation) (except the `npm install` step).
With next-redux-wrapper in place, go ahead and in `pages/_app.js`:
If you do not have next-redux-wrapper set up, follow their [installation instructions for version 5](https://github.com/kirill-konshin/next-redux-wrapper/tree/5.x#installation) (except the `npm install` step).
Note, that next-redux-cookie-wrapper is a drop-in replacement for next-redux-wrapper at version 5, and version 6 is not supported at the moment (see https://github.com/bjoluc/next-redux-cookie-wrapper/issues/5#issuecomment-622057894 for details).
With next-redux-wrapper v5 in place, go ahead and in `pages/_app.js`:

```diff
- import withRedux from "next-redux-wrapper";
Expand Down

0 comments on commit 9a42588

Please sign in to comment.