Menu

No jargon, 1 minute to completely understand — a simple Redux alternative: react-shared-vars

#reactjs#redditreactjs#react#count#components
Reading 0:00
15s threshold

Let’s be honest about what global state management in most React apps actually is: it’s just assigning values to global variables and triggering re-renders in the components that use them.

Yet for years, we’ve been forced to learn a dictionary of heavy jargon just to share a variable across components:

"Store" / "Slice" — For most apps, it’s literally just a variable. Why wrap it in store terminology?

"Dispatch" / "Action" / "Reducer" — It’s just assigning a new value ( = ) and running subscribed callbacks. Why split a simple assignment into steps like we're putting an elephant into a fridge?

"Selector" — We aren't sorting eggs by size on a farm. We are just reading a variable.

"Thunk" — That’s just a normal async API call that every SPA needs.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.