How to use the react-context-hook.useStoreState 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
function App() {
  const globalState = useStoreState()
  return (
    <div>
      <header title="React context Hook">
      <section>
        <h3>
          This is a React App that has a global state. This is the global{' '}
          <em>store</em> value.
        </h3>
        <pre>          <code>{JSON.stringify(globalState, null, ' ')}</code>
        </pre>
        <h4>
          You can change the global state from different components, using the</h4></section></header></div>

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