Skip to content

Instantly share code, notes, and snippets.

@binaryta
Created February 25, 2018 15:47
Show Gist options
  • Save binaryta/9fb18942fa5e5ee9fa1f8bcf29c20e17 to your computer and use it in GitHub Desktop.
Save binaryta/9fb18942fa5e5ee9fa1f8bcf29c20e17 to your computer and use it in GitHub Desktop.
import { h, app, View } from "hyperapp"
import { state, State } from "./state"
import { actions, Actions } from "./actions"
export const view: View<State, Actions> = (state, actions) => (
<div>
<h1>{state.count}</h1>
<button onclick={() => actions.down(1)}>-</button>
<button onclick={() => actions.up(1)}>+</button>
</div>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment