https://github.com/devmahmud/nextjs-redux-toolkit-typescript
Next JS, Redux Toolkit, Axios boilerplate with JSON Placeholder api integrated for demonstration.
https://github.com/devmahmud/nextjs-redux-toolkit-typescript
axios nextjs react-hooks reactjs redux redux-persist redux-store redux-toolkit
Last synced: 4 months ago
JSON representation
Next JS, Redux Toolkit, Axios boilerplate with JSON Placeholder api integrated for demonstration.
- Host: GitHub
- URL: https://github.com/devmahmud/nextjs-redux-toolkit-typescript
- Owner: devmahmud
- Created: 2022-08-20T07:18:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T10:32:15.000Z (about 3 years ago)
- Last Synced: 2025-01-06T21:46:01.148Z (about 1 year ago)
- Topics: axios, nextjs, react-hooks, reactjs, redux, redux-persist, redux-store, redux-toolkit
- Language: TypeScript
- Homepage:
- Size: 96.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Next JS, Redux Toolkit, Typescript Boilerplate
Next JS, Typescript, Redux Toolkit boilerplate with Axios.
## Prerequisites
- [Node.js > 12](https://nodejs.org) and yarn (Recommended: Use [nvm](https://github.com/nvm-sh/nvm))
## Base dependencies
- [@reduxjs/toolkit](https://redux-toolkit.js.org/) for managing global state.
- [Axios](https://github.com/axios/axios) for networking.
- [Typescript](https://www.typescriptlang.org/) to type-check components exposed properties.
- [react-hook-form](https://react-hook-form.com/) for managing form state.
- [redux-persist](https://github.com/rt2zz/redux-persist) as persistance layer.
## Usage
You can start by cloning this repository. After that you should proceed as with any javascript project:
- Go to the project's root folder and run `yarn install` or `npm install`.
- Run `yarn dev` or `npm run dev` to start the development server!
## Folder structure
This template follows a very simple project structure:
- `components`: Folder to store any common component that we use through your app (such as a generic button)
- `pages`: All the application pages.
- `public`: Folder to store the publicly accessible files.
- `redux`: This folder should have all our reducers, and expose the combined result using its `rootReducer.ts`
- `slices`: Folder that contains all redux slices.
- `services`: Folder to store your network related services.
- `styles`: Folder to store all the styling.
- `@types` This folder contains all the types.