Skip to content

Instantly share code, notes, and snippets.

@richarddd
Last active August 12, 2019 05:51
Show Gist options
  • Save richarddd/3bd4e529504b0255e01a70765c168082 to your computer and use it in GitHub Desktop.
Save richarddd/3bd4e529504b0255e01a70765c168082 to your computer and use it in GitHub Desktop.
const App = () => {
const { actions, state } = useStore(counterStore);
return (
<>
<h1>Count {state.count}</h1>
<button onClick={() => actions.decrement()}>-</button>
<button onClick={() => actions.increment()}>+</button>
</>
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment