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

staltz/cycle-storageify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 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 storageify branch of TodoMVC.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%