Due to my love for Next js, styled-components and Redux Toolkit and the unneccessary stress that comes with setting up a new Next js project with the aforementioned libraries, I decided to make a starter project to save you a lot of stress in configuring your nextjs projext and these libraries.
A lot of the stress that comes with setting up these packages with Nextjs are as a result of Next js being run on the a development server. Some of these stress include:
- Styled components (I already created the nextjs custom document file to help in injecting the styles). Server side rendered Styled Components with NextJS.
- Configuring Redux toolkit with next js app can be tiresome.
- Redux persist storage used to persist redux stores to local storage is not as simple to set up when using Next js.
- Also, I integrated styled icon into the project that can be used
This is a Starter Project to get you quickly started with Next js, Styled-components, Redux Toolkit and styled-icons.
You also get global imports from any of your file. For example
import CounterReducer from "store"
Make a clone of this project by using the command below
git clone https://github.com/obiofiong/Nextjs-StarterKit.git
Then cd into the project directory and install all dependencies.
If you use npm then you should run
npm install
Otherwise, if you are using yarn then you should run
yarn add
To run the project
npm run dev
Then go to your browser and open http://localhost:3000 to see the project running.
You can start by editing the index.js file in the pages folder to start your development.
Github link - https://github.com/obiofiong
LinkedIn - https://www.linkedin.com/in/john-obiofiong
Follow me on my social links.
I am available to work on any project within my knowledge scope.