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:

how to use the ternary operator in javascript

How to use the ternary operator in JavaScript

Add to your JavaScript knowledge of shortcuts by mastering the ternary operator, so you can write cleaner code that your fellow developers will love.

Chizaram Ken
Feb 21, 2025 ⋅ 7 min read
Using tsup To Bundle Your TypeScript Package

Using tsup to bundle your TypeScript package

Learn how to efficiently bundle your TypeScript package with tsup. This guide covers setup, custom output extensions, and best practices for optimized, production-ready builds.

Muhammad Ali
Feb 20, 2025 ⋅ 7 min read
how to use react higher order components

How to use React higher-order components

Learn the fundamentals of React’s high-order components and play with some code samples to help you understand how it works.

Hussain Arif
Feb 20, 2025 ⋅ 10 min read
dependency inversion principle

Understanding the dependency inversion principle (DIP)

Learn about the dependency inversion principle (DIP), its importance, and how to implement it across multiple programming languages.

Samuel Olusola
Feb 20, 2025 ⋅ 8 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