How to use the storeon/react/context.Provider function in storeon

To help you get started, we’ve selected a few storeon 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 storeon / localstorage / test / demo / index.js View on Github external
function App () {
  return h(Fragment, null,
    h('div', null, 'After refresh the page the state should be same'),
    h(Tracker1),
    h('div', { className: 'buttons' },
      h(Button1),
      h(ButtonClear)
    )
  )
}

let store = createStore([counter, logger, persistState(), devtools()])

render(
  h(StoreContext.Provider, { value: store }, h(App)),
  document.querySelector('main')
)

storeon

Tiny (180 bytes) event-based Redux-like state manager for React and Preact

MIT
Latest version published 3 years ago

Package Health Score

60 / 100
Full package analysis