Skip to content

Instantly share code, notes, and snippets.

@aakashns
Created March 23, 2017 08:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aakashns/23f1efa8f70b6cd5f060532e337684c1 to your computer and use it in GitHub Desktop.
Save aakashns/23f1efa8f70b6cd5f060532e337684c1 to your computer and use it in GitHub Desktop.
Simple version of linkStoreWithDb
const linkStoreWithDb = (fromDb, fromStore) => {
return (db, store) => {
fromDb(db, store.dispatch);
store.subscribe(() => fromStore(store.getState(), db)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment