How to use the react-context-hook.withStore 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 / App.js View on Github external
)
}

const initialState = { count: 10 }

const storeConfig = {
  listener: state => {
    console.log('state changed', state)
  },
  logging: true //process.env.NODE_ENV !== 'production'
}

export default withStore(App, initialState, storeConfig)

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