LeetCode-OpenSource/rxjs-hooks

how organize global state store ?

zlv-thisF opened this issue · 2 comments

i am new to rxjs, the rxjs-hooks library is quite inspiring to me !!

since hooks have separated the hard nut to crack (state in class based component ) from component and make it easy to combine and reuse components, i am wondering that is there a way to handle global state by rxjs and how ?

it seems that "state" or "value" is calculated by useObservable or useEventCallback and pass logical code as parameter in myComponent , what if i want reuse it in myOtherComponents . Wrap it in my own useMyHooks maybe a method.

my questtion is that: in react hooks, is there a good way to handle global state with rxjs ? (like store in mobx, reducer in redux) , or do rxjs need it ?

@Brooooooklyn , seems Cool, i will try!~
thx for help!