Skip to content

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

License

Notifications You must be signed in to change notification settings

maiermic/cycle-storageify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published