How to use the subx.autoRun function in subx

To help you get started, we’ve selected a few subx 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 electerm / electerm / src / client / store / index.js View on Github external
})

Subx.autoRun(store, () => {
  ls.set('sessions', copy(store.tabs).map(t => {
    delete t.isTransporting
    return t
  }))
  return store.tabs
})

Subx.autoRun(store, () => {
  ls.set('bookmarks', store.bookmarks)
  return store.bookmarks
})

Subx.autoRun(store, () => {
  const themesObj = store.themes.reduce((p, k) => {
    return {
      ...p,
      [k.id]: k
    }
  }, {})
  ls.set('themes', themesObj)
  return store.themes
})

Subx.autoRun(store, () => {
  ls.set('quickCommands', store.quickCommands)
  return store.quickCommands
})

Subx.autoRun(store, () => {

subx

SubX, Next generation state container

MIT
Latest version published 3 years ago

Package Health Score

42 / 100
Full package analysis