TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Flatstore, simplified state across ReactJS components, suck it redux

3 pointsby JoeOfTexasover 2 years ago
I&#x27;ve been using this on my projects since 2019, and it&#x27;s made my life so much easier sharing and reacting to state changes across components.<p>Redux has made life a living hell at my job trying to follow code trails for debugging.<p>In any case, its great for personal projects. The code is very lightweight at about 300 lines and zero dependencies.<p>flatstore unofficially supports history with undo&#x2F;redo, but I haven&#x27;t used it much. The hook `useWatch` is the latest update for function components to track state changes. If you still use legacy class components, it uses a similar HOC approach as redux for state changes.<p>But I recommend converting to functional components asap, as it shrinks code a lot, and you just need get&#x2F;set&#x2F;useWatch to do anything.

1 comment

niuxover 2 years ago
Would you recommend using it in production?
评论 #34315765 未加载