2024-03-16
3740
#nextjs
Madars Bišs
103513
Mar 16, 2024 ⋅ 13 min read

Understanding state management in Next.js

Madars Bišs Madars Bišs (aka Madza) is a technical writer. In his spare time, he loves to explore new topics and contribute to open-source web development.

Recent posts:

Is Better Auth the key to solving authentication headaches?

Better Auth is an open-source, TypeScript-first auth library with adapters, schema generation, and a plugin system. Here’s how it works and how it stacks up to Clerk, NextAuth, and Auth0.

David Omotayo
Sep 26, 2025 ⋅ 10 min read
What using a screen reader taught me about real web accessibility

What using a screen reader taught me about real web accessibility

Read one developer’s detailed account of using a screen reader to learn more about a11y and build more accessible websites.

Sebastian Weber
Sep 25, 2025 ⋅ 29 min read
david turnbull claude code hacks

6 easy ways to level up Claude Code

Walk through six tips and tricks that help you level up Claude Code to move beyond simply entering prompts into a text box.

David Turnbull
Sep 24, 2025 ⋅ 5 min read

Choosing the right React Router v7 mode for your project

React Router v7 is now more than routing. This guide explains its three modes—declarative, data, and framework and how to choose the right one for your app.

Amazing Enyichi Agu
Sep 23, 2025 ⋅ 1 min read
View all posts

4 Replies to "Understanding state management in Next.js"

  1. Nice, simple and helpful article.

    I have one suggestion. In the first example I would recommend using the
    setState(prevstate => prevstate + 1)
    syntax , because in more complex scenarios, where the setState is called from multiple places, the result not always what we expect. Although in this simple Example it will work perfectly fine.

  2. I think i’m missing something. How is any of this unique to NextJS? Most of this is just React specific hooks?

    1. well nextjs is built on top of react and most of the things are common, It just adds some more optimization logic that is all.

Leave a Reply