How to use the react-context-hook.store.set function in react-context-hook

To help you get started, we’ve selected a few react-context-hook 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 Spyna / react-context-hook / example / src / nonComponent.js View on Github external
export default function() {
  store.set('count', 25).then(() => {
    console.log(`I modified the store, and I'm not a React component`)
  })
  store.set('pippo', 25)
}
github Spyna / react-context-hook / example / src / nonComponent.js View on Github external
export default function() {
  store.set('count', 25).then(() => {
    console.log(`I modified the store, and I'm not a React component`)
  })
  store.set('pippo', 25)
}

react-context-hook

A React.js global state manager with Hooks and Context API

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis