
Show HN: Preducs - cristianbote
https://github.com/cristianbote/preducs
======
cristianbote
Hi everyone,

I just released this small state management library, for any Javascript app. I
know there are other alternatives, out there, but give it a try, you won't
regret it!

I'm introducing the concept of functional modifiers, that can be async or not.
You can achieve really cool stuff with them. Something like:

    
    
      store.update(
        {
          foo: true
        },
        (cached, fresh) => {
          return fetch('/api').then(res => {
            return { ...fresh, ...res.json() };
          })
        }
      );
    

You can achieve really interesting stuff.

All feedback is welcomed! Thank you!

