News for hackers. Stuff that matters.
Re:Reasons to Learn Redux as a JavaScript Developer by gunn on Wednesday January 01, 2020 @02:36AM (#21927106)
Here's the library I wrote to replace redux for myself: https://github.com/gunn/pure-store

It's the simplest API I could think of, has excellent type support, and handles immutability for you.

Re:Reasons to Learn Redux as a JavaScript Developer by lioeters on Wednesday January 01, 2020 @10:56AM (#21928512)
Thank you for pure-store, I'm surprised it hasn't attracted more attention!

The API is perfectly small and straight-forward, it's close to the ideal I imagine.

For a few years I've been using a similarly tiny library I wrote to reduce Redux's verbosity, but I may migrate to pure-store as it's even smaller and gets to the essence of state management.

Seeing the popularity of React hooks and Redux+friends, I know I'm in the minority of people who lament the direction they're going. I'm secretly hoping for a "destructuring" of the React ecosystem into more generic concepts/libraries/modules that work with or without React, carrying on the lessons learned but implemented as simple and independent as possible.

To me, pure-store (and immer for sure) is one of those libraries that point the way to a better future.

Re:Reasons to Learn Redux as a JavaScript Developer by bcherny on Wednesday January 01, 2020 @03:19AM (#21927199)
Looks very similar to Undux! https://undux.org/

Then again, who hasn’t built a state management framework for React?

Re:Reasons to Learn Redux as a JavaScript Developer by will123195 on Wednesday January 01, 2020 @10:08AM (#21928282)
Nice. My take on the simplest possible API:

https://github.com/will123195/venti