Now I have some time to look into this, some quick thoughts:
As I said before, I completely agree with your premise. We need sth like this.
There is even more prior art, see
- GitHub - Miserlou/live_json: LiveJSON - LiveView for JSON by @Miserlou
- JSON with LiveView - #9 by methyl @methyl
- Redex - Predictable Server Side State Containers - à la Redux for Elixir @harmon25
So obviously there is something going on. Forces should be joined.
Good point. Nice and straight forward impl with set/patch_state
. This should make the backend fast enough (and faster than storex).
As for the client-side impl, can you say how busy React is applying the new state? For solidjs there should be a way to directly translate a JSONpatch to setStore
’s path API (so there is close to no work to do on the client).
SSR is interesting, but I have no clue and no comment.
What do you think about using Phoenix routing with StateChannel? Or generally speaking: what is needed to do with StateChannel and Phoenix what https://inertiajs.com/ does.
What do you think of implementing the GitHub - krausest/js-framework-benchmark: A comparison of the performance of a few popular javascript frameworks app instead of your shopper. Will give some more insight in the performance of the approach.
related: