How to use the @ice/store function in @ice/store

To help you get started, we’ve selected a few @ice/store examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ice-lab / icestore / examples / todos-ts / src / stores / index.ts View on Github external
import Icestore from '@ice/store';
import logger from '@ice/store-logger';
import todos from './todos';

const icestore = new Icestore();

const middlewares: ((ctx, next) => {})[] = [];

if (process.env.NODE_ENV !== 'production') {
  middlewares.push(logger);
}

icestore.applyMiddleware(middlewares);

const stores = icestore.registerStores({
  todos,
});

export default stores;
github ice-lab / icestore / examples / todos / src / stores / index.js View on Github external
import Icestore from '@ice/store';
import logger from '@ice/store-logger';
import todos from './todos';

const icestore = new Icestore('todos');

const middlewares = [];

if (process.env.NODE_ENV !== 'production') {
  middlewares.push(logger);
}

icestore.applyMiddleware(middlewares);

const stores = icestore.registerStores({
  todos,
});

export default stores;

@ice/store

Simple and friendly state for React

MIT
Latest version published 1 year ago

Package Health Score

52 / 100
Full package analysis

Popular @ice/store functions