|
1 | | -# Boilerplate for Next Redux Wrapper with Redux Persist (& redux-thunk too) for a Next Js project |
| 1 | +# Boilerplate for Next Redux Wrapper with Redux Persist (& redux-thunk too) for Next JS project 😍 |
2 | 2 |
|
3 | | -My problem was that I needed a simple persistent global state for my Next.js website. This is a redux boilerplate and I wrote it for myself at first to speed up my future project. You may need this code to understand the process. If you want to use this in your project, feel free to use it. |
| 3 | +My problem was that I needed a simple persistent global state for my Next.js website. This is a redux boilerplate and I wrote it for myself at first to speed up my future project. |
4 | 4 |
|
5 | | -Using a persistent global state in a Next js website is much more daunting than I thought! See my [twitter](https://twitter.com/fazlulkarimweb/status/1266463218265812992). You have to have a solid understanding of client-side and server-side rendering & how Next js is dealing with it! Obviously don't forget about the persistency feature and some performance drawbacks of in case of server-side rendering. So I created this boilerplate with a counter app example. |
| 5 | +Using a persistent global state in a Next js website is much more daunting than I thought! See my [twitter](https://twitter.com/fazlulkarimweb/status/1266463218265812992) 😂. You have to have a solid understanding of client-side and server-side rendering & how Next js is dealing with it! Obviously don't forget about the persistency feature and some performance drawbacks of in case of server-side rendering. So I created this boilerplate with a classic counter app example. |
6 | 6 |
|
7 | 7 |  |
8 | 8 |
|
9 | | -## Why this boileplate? |
| 9 | +## Why this boileplate? 😰 |
10 | 10 |
|
11 | | -Copy and pasting redux boilerplate code without understanding seems a norm to people who are relatively new to the redux ecosystem. If you are new to redux, you may use this boilerplate to copy and paste and attain the functionality right away. Okay, you can do this. But it will be more helpful if you understand the code and implement it by yourself. You may take help from this boilerplate code. I didn't find a boilerplate like this in the next js example section. Besides I used hook every time in my redux code. hooks in redux are elegant and powerful. I decided to write one for myself! |
| 11 | +Copy and pasting redux boilerplate code without understanding seems a norm to people who are relatively new to the redux ecosystem. If you are new to redux, you may use this boilerplate to copy and paste and attain the functionality right away. Okay, you can do this. But it will be more helpful if you understand the code and implement it by yourself. You may take help from this boilerplate code. I didn't find a boilerplate like this in the next js example section. Besides I used hook every time in my redux code. The example in the next js repo weren't written with the hooks. Hooks in redux are elegant and powerful.😍 |
| 12 | + |
| 13 | +So I decided to write one for myself! |
12 | 14 |
|
13 | 15 | ## Enough Talk, Show me the code |
14 | 16 |
|
@@ -78,7 +80,7 @@ Screenshot for understanding the file structure along with the code. |
78 | 80 |
|
79 | 81 | ## External API call & NEXT RUN BUILD |
80 | 82 |
|
81 | | -I tried to add some external API call to see the hydration and rehydration process. A look into the SSG, Static & SSR rendering of the pages in this boilerplate. Seems good to me. |
| 83 | +I tried to add some external API call to see the hydration and rehydration process. Have a look into the SSG, Static & SSR rendering of the pages in this boilerplate. Seems good to me. |
82 | 84 |
|
83 | 85 |  |
84 | 86 |
|
|
0 commit comments