@searchspring/snap-store-mobx
TypeScript icon, indicating that this package has built-in type declarations

0.61.3 • Public • Published

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

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());

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.61.30latest

Version History

VersionDownloads (Last 7 Days)Published
0.61.30
0.61.22,344
0.61.1146
0.61.0141
0.60.453
0.60.32
0.60.110
0.60.02
0.59.038
0.58.3423
0.58.23
0.58.12
0.58.02
0.57.01
0.56.62
0.56.51
0.56.41
0.56.31
0.56.21
0.56.11
0.56.01
0.55.03
0.54.08
0.53.41
0.53.32
0.53.21
0.53.11
0.53.01
0.52.23
0.52.11
0.52.02
0.51.21
0.51.11
0.51.01
0.50.01
0.49.12
0.49.04
0.48.01
0.47.01
0.46.02
0.45.11
0.45.02,016
0.44.31
0.44.21
0.44.11
0.44.01
0.43.13
0.43.01
0.42.31
0.42.21
0.42.11
0.42.01
0.41.21
0.41.11
0.41.01
0.40.01
0.39.31
0.39.21
0.39.11
0.39.01
0.38.11
0.38.01
0.37.11
0.37.01
0.36.01
0.35.01
0.34.71
0.34.61
0.34.51
0.34.41
0.34.31
0.34.21
0.34.11
0.34.01
0.33.01
0.32.01
0.31.02
0.30.22
0.30.11
0.30.01
0.29.01
0.28.01
0.27.816
0.27.71
0.27.61
0.27.53
0.27.41
0.27.31
0.27.21
0.27.11
0.27.01
0.26.11
0.26.01
0.25.11
0.25.01
0.24.01
0.23.11
0.23.01
0.22.01
0.21.11
0.21.01
0.20.51
0.20.41
0.20.31
0.20.21
0.20.11
0.20.01

Package Sidebar

Install

npm i @searchspring/snap-store-mobx

Weekly Downloads

4,903

Version

0.61.3

License

MIT

Unpacked Size

373 kB

Total Files

183

Last publish

Collaborators

  • searchspring-nebo