Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A boilerplate NextJS with Redux and Material UI

A full-stack Next.js TypeScript template focused on functionality over UI, featuring Zustand, TanStack Query, and ESLint 9 support.
NextJS with Redux and Material-UI example is a boilerplate project that demonstrates how to combine Next.js server-side rendering with Redux state management and Material-UI components in a single starter application.
This is a boilerplate/example project for building Next.js applications with Redux and Material-UI. It takes a minimal counter app as its use case and shows how to initialize Redux on the server via getInitialProps, pass the initial state to the client, and manage client-side dispatches. The project is authored by GitHub user joaopaulomoraes and is licensed under CC0 (public domain).
next-redux-wrapper to connect a Redux store to Next.js pages and supports server-side rendering of Redux state.store.js file creates a new Redux store for each server request to avoid data mixing between users, and reuses the same store on the client.yarn dev to serve at http://localhost:3000 with hot reload during development.pages/index.js maps to the / route, making the code easy to read and modify.next-redux-wrapper and getInitialProps work together.isServer flag changes dispatch behavior.next-connect-redux, which offers similar features, if you want to explore other integration options.Clone the repository, run yarn install, then yarn dev to launch the dev server at http://localhost:3000. The example counter is initialized to 1 on the server render and then updates from client dispatches. The store.js file separates store creation per environment.
The counter initializes at 0, but because getInitialProps dispatches an increment on the server, the first rendered value is 1. Subsequent clicks dispatch actions on the client, and a flag above the counter shows whether the dispatch came from the server or the client.
Clone the repository, run yarn install, then yarn dev. The app will be available at http://localhost:3000 with hot reload.
Yes, the project is released under the CC0 1.0 license, placing it in the public domain.
On the server, a new Redux store is created for each request so data is not mixed between users. On the client, the same store instance is reused across navigations.
Yes, Material-UI is included and used to build the UI. The components are styled with MUI, so you can extend them using MUI's theming and styling system.