Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 383 Bytes

counter.mdx

File metadata and controls

22 lines (16 loc) · 383 Bytes

import { State, Observe } from '../es'; import { Link } from "@reach/router";

Counter

<State initialState={{ count: 0 }}>

{({ setState }) => ( setState(s => ({ count: s.count + 1 }))}> Click me )}

The button has been clicked:

{ ({...state}) => (`${state.count} times`) }