react-rxjs-provider
Examples:
Example based on create-react-app
API:
react-rxjs-provider
providers <Provider />
, which makes observables available to the rest of your app:
;;;;;const observables =TODOS_OBSERVABLE_KEY: todos$;ReactDOM;
react-rxjs-provider
providers @subscribe()
HOC to subscribe your component to observables:
;;;const Todos =<ul>propsvaluesTODOS_OBSERVABLE_KEY</ul>;TODOS_OBSERVABLE_KEYTodos;
react-rxjs-provider
providers @inject()
HOC to inject observables in your component:
;;;Component{// ...thispropsobservablesTODOS_OBSERVABLE_KEYnext// ...;// ...};{return<form onSubmit=thisaddTodo><input type="text"/><button type="submit">Add Todo</button></form>}TODOS_OBSERVABLE_KEYAddTodo;