At Potions we are working on… A new reactive framework based on RxJS and custom-elements.
Il semble que la perfection soit atteinte non quand il n'y a plus rien à ajouter, mais quand il n'y a plus rien à retrancher. Saint-Exupéry
Following Saint-Exupery’s quote, we want to strip down “reactivity” to what we think constitute its absolute core :
states (stores)
dependencies (effects)
events (actions)
Whereas every reactive framework tackles the state issues (most of the time by providing a “single immutable state tree”) very few mentions dependencies, although dependencies are where the magic happens : rendering from a state, modifying a state (like redux actions), linking two states…
Let’s dive in an example of dependencies : rendering a state.
We, developers, obviously want to handle one part of this dependency with a render(state) method that we can define.
However we don’t want to handle the when, why, and how this render method is called. When the state changes, we want our component to rerender.
The principles behind our framework :
- As little boilerplate and new concepts as possible
- Custom-elements