News for hackers. Stuff that matters.

limscoder

Does it de-dupe requests if multiple components need the same URL?
Redux is difficult to reason about because side-effects can be triggered from anywhere in the application by middleware.

If you're using something like redux-thunk, a single dispatch can cause both a store mutation AND trigger a side effect, which is confusing. I'd rather have those be 2 separate concerns.

Those dispatches can be triggered from anywhere in the app, and multiple middlewares may trigger multiple side-effects in new and exciting ways.

I find that logic to be difficult to follow and test.

I wish it had a more opinionated way to do side-effects, but the solutions like redux-saga seem even more complicated and confusing.

I've been experimenting with using a component to fetch data. The data to fetch is declaratively described as props.

https://github.com/limscoder/react-wrangler

It uses immutable and allows for time travel debugging.