cycle-storageify
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

Cycle.js storageify

Augments your Cycle.js component (main function) by storing its onion-shaped state in local storage.

Quick example

import onionify from 'cycle-onionify';
import storageify from 'cycle-storageify';
import storageDriver from '@cycle/storage';
// ...

const wrappedMain = onionify(storageify(main, {key: 'my-local-storage-key'}));

Cycle.run(wrappedMain, {
  DOM: makeDOMDriver('#app'),
  storage: storageDriver,
});

Advanced example

See onionify branch of TodoMVC in Cycle.js.

Readme

Keywords

none

Package Sidebar

Install

npm i cycle-storageify

Weekly Downloads

8

Version

4.0.1

License

MIT

Last publish

Collaborators

  • maiermic