Created
October 23, 2019 12:51
-
-
Save coffee-cup/b1e287df2424d3508a2dbd29b2b27b05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from "react"; | |
import { state, watch, dispatch } from "./model"; | |
import { increaseCount, decreaseCount } from "./actions"; | |
export const App = () => ( | |
<div> | |
<button onClick={() => dispatch(decreaseCount)()}>-</button> | |
<h1>Count: {watch(state.count)}</h1> | |
<button onClick={() => dispatch(increaseCount)()}>+</button> | |
</div>); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment