Skip to content

snap-store-mobx 0.13.2

Install from the command line:
Learn more about npm packages
$ npm install @searchspring/snap-store-mobx@0.13.2
Install via package.json:
"@searchspring/snap-store-mobx": "0.13.2"

About this version

Snap MobX Store

NPM Status

Management of Snap state using Mobx.

Dependency

Snap Store MobX is a dependency of @searchspring/snap-controller NPM Status

Dependencies

Snap Store MobX requires the following dependencies as services:

NPM Status @searchspring/snap-url-manager

Package dependencies hierarchy

Installation

npm install --save @searchspring/snap-store-mobx

Import

import { AbstractStore, SearchStore, AutocompleteStore, FinderStore, RecommendationStore, StorageStore } from '@searchspring/snap-store-mobx';

Controller usage

Snap Store MobX is a dependency of Snap Controller which will handle store changes as needed. As such, it is recommended to use methods of the controller to access and update the store.

Standalone usage

import { SearchStore } from '@searchspring/snap-store-mobx'
import { UrlManager, UrlTranslator } from '@searchspring/snap-url-manager';

const searchConfig = {
	id: 'search',
	globals: {
		pagination: {
			pageSize: 12
		}
	}
};

const store = new SearchStore(searchConfig, { urlManager: new UrlManager(new UrlTranslator()) });

store.update(data);

// log the store
console.log(store.toJSON());

Details


Assets

  • snap-store-mobx-0.13.2-npm.tgz

Download activity

  • Total downloads 123
  • Last 30 days 0
  • Last week 0
  • Today 0