News for hackers. Stuff that matters.
Re:Algebraic Effects for React Developers by etaioinshrdlu on Sunday November 01, 2020 @08:49PM (#24964204)
I’m wondering if part of the problem is that I’ve made a poor life choice in making this library the central state manager in a large app: https://github.com/RisingStack/react-easy-state

The stack traces are truly and utterly useless. One cannot see what triggered a rerender or other reactive action.

And a rerender can be triggered between two lines of synhronous code, magically, thanks to es6 proxies. What have I done???

Re:Algebraic Effects for React Developers by ricksharp on Sunday November 01, 2020 @09:35PM (#24964388)
Everybody makes state management hard.

All you need is a simple layer to make your typed api calls.

export const ApiService = {

  return {
    getSomeStuff: async () => ...,
    postSomething: ...,
    etc,
  };
}