How does Relessjs compare to RepatchJS ?
Dan Coman

From what I see is that Repatch differences from Relessjs where it uses a dispatch function in async reducers that takes a reducer as parameter. This way you cannot track it since it’s not a named function that can be seen as an action.

In Relessjs we had something like that at first where were we had an update function taking a new state: update({ ...state: { some: "property" }}). Essentially this is a side-effect on the state.

When you want to do something asynchronous we chose for a different solution. We pass all reducers when returning a function from the reducer payload => state => reducers => void. This reducer can then be called with a payload. An example of this can be found here

Because you call a reducer, even when doing something async, we can track it with Redux dev tools. The dev-tools will take the reducers names as ‘actions’ and the payload and state as is. An example of this is currently in a feature branch where I’m integrating Redux devtools, which can be found here:

Like what you read? Give Albert G a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.