slorber / scalable-frontend-with-elm-or-redux

An attempt to make Redux and Elm applications scale
http://sebastienlorber.com/
MIT License
361 stars 29 forks source link

Redux ship #34

Closed clarus closed 7 years ago

clarus commented 7 years ago

Hi, thanks for this challenge, which summarizes well many problems happening with front-end development.

Here is a solution using Redux Ship, a library for side effects I am wording on. The main idea of Redux Ship for composition is the commit / patches mechanism (see the README of the solution or the documentation of Redux Ship). The other aim of this project is to simplify testing of side effects using snapshots of the program trace.

slorber commented 7 years ago

Thanks for your contribution.

As far as I understand now, redux-ship is an alternative to redux-saga, still using generators, with better type support and snapshot testing (not to be mistaken by event-log projection snapshots, wasn't clear in the beginning what you meant by snapshots)

Will try to take a deeper look when I'll have time.

guicar commented 7 years ago

Thanks for merging. What do you mean by "event-log projection snapshots"?

slorber commented 7 years ago

This is a technique used in event-sourced systems (and somehow the Redux actions array is an event log, and reducers handle the projection). A snapshot is just the action array on which you run the reducer. The state of the Redux store at a given time is a snapshot.