Skip to content

Instantly share code, notes, and snippets.

@coffee-cup
Created October 23, 2019 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coffee-cup/c950d3d4ef3a212217320ef9149d94cf to your computer and use it in GitHub Desktop.
Save coffee-cup/c950d3d4ef3a212217320ef9149d94cf to your computer and use it in GitHub Desktop.
import * as React from "react";
import { useOvermind } from "./overmind";
const Counter: React.FC = () => {
const { state, actions } = useApp();
return (
<div className="App">
<h1>{state.count}</h1>
<button onClick={() => actions.decreaseCount()}>decrease</button>
<button onClick={() => actions.increaseCount()}>increase</button>
</div>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment