# mobx **Repository Path**: parity-js/mobx ## Basic Information - **Project Name**: mobx - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-01-05 - **Last Updated**: 2021-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # @parity/mobx Create one MobX store per JSON-RPC method. ## Usage `@parity/mobx` creates one MobX store per RPC method, with an observable value updating whenever the underlying pubsub RPC fires. For example, let's take syncing state. Instead of making a pubsub directly to `api.pubsub.eth.syncing((error, result) => ...)` to detect whether we're currently syncing or not, we just spawn a MobX store, and observe the changes. ```javascript import stores from '@parity/mobx' @observer class MyComponent extends React.Component { this.syncingStore = stores.eth.syncing().get(api); // Pass the api object to the store render() { const { syncing } = this.syncingStore return