Closed loganpowell closed 6 years ago
Thank you. If you're are looking for a place to start with your own implementation I would suggest looking at https://github.com/MichalZalecki/rx-state/blob/master/src/RxState.js which is more compact than code in this repo.
Is the approach ready for prime time?
It depends on how you look at it. I would not use rx-state
as a library. Since you like an idea just copy RxState.js
to your project and add or take what you need. Since its just a few lines of RxJS-specific it comes down to whether you are comfortable with RxJS (and you probably are).
Thanks for the guidance :) 🥇
Hi @MichalZalecki ! I think your ideas are brilliant. There are a couple other libraries out there that are really taking this concept to the extreme:
1) Calmm: uses Kefir observables, atoms, lenses and a special React Implementation to enable observables to be used directly within the components.
2) Focal: fork and port of
calmm
that uses RxJS instead of Kefir, and some additional short-cuts that make state management super straight-forward (for those comfortable with lenses, atoms and observables). This library is used in production at Grammarly.3) ReduRx: Also using RxJS for state management, but keeps the flux pattern.
I am searching around for something with the elegance of what you're proposing. I like that your proposal considers interoperability with the existing ecosystem rather than rolling an entirely new React implementation to embed the observables directly.
Given the aforementioned libraries and my desire for interoperability with other libraries (e.g.,
material-ui
, react-native), would you recommend I use your repo as my seed? Is the approach ready for prime time?