feathers-mobx
Inplement feathers client into your mobx store
feathers-mobx is an integration of the Feathers Client for mobx
.
It can be used with any mobx client like react-mobx
and vue-mobx
.
documentation
example
Quick start
installation
yarn add feathers-mobx
usage
// <stores.js> ;;; ; const socket = ;const client = ; client; const options = {}; todoStore: userStore: authStore: ;
// <components/App.js> ;; ; { const todoStore = ; ; return <div className="todos"> <div>todoStoreisFindPending && 'loading...'</div> <div>todoStoreerrorOnFind?message}</div> todoStoreitems?} </div> );});
namespaces
Namespaces is a feature designed to handle different sets of items at the same time.
// <components/App.js> ;; ; { const todoStore = ; ; return <div className="todos"> <div>todoStorenamespacesbaritem?name}</div> <div>todoStorenamespacesfooisFindPending && 'loading...'</div> <div>todoStorenamespacesfooerrorOnFind?message}</div> todoStorenamespacesfooitems?} </div> );});
update
, patch
and remove
actions are not scoped in each namespaces. So, the following code will not work:
todoStorenamespacesfooisUpdatePending; // NOtodoStoreisUpdatePending; // YES
License
MIT