🔹 useState

  • Great for managing state inside one component or page
  • Useful for MVPs, quick tests or small apps
  • Easy to write, less setup
  • But not ideal for growing or multi-page apps

🔸 useContext

  • Lets you share state between multiple components/pages
  • Perfect for global things like cart, authentication, dark mode, etc.
  • Needs a provider, but it’s how real-world apps are built
  • I’m using it now to build my shopping cart the professional way

✅ Mental pattern

  • If the state is used in just one place → useState
  • If it needs to be shared → useContext

✍️ Note to myself:

This post is part of my devlog. I write to grow, to stay focused, and maybe help others too.


💻 buildlogmmd – quiet devlog, strong progress