()
| 86 | InputComponent.displayName = 'InputComponent' |
| 87 | |
| 88 | function CountComponent() { |
| 89 | const [{ count, input }, actions] = useAyanami(Count) |
| 90 | const [{ tips }] = useAyanami(Tips) |
| 91 | |
| 92 | const add = (count: number) => () => actions.add(count) |
| 93 | const minus = (count: number) => () => actions.minus(count) |
| 94 | |
| 95 | return ( |
| 96 | <div> |
| 97 | <p>count: {count}</p> |
| 98 | <p>input: {input}</p> |
| 99 | <p>tips: {tips}</p> |
| 100 | <button onClick={add(1)}>add one</button> |
| 101 | <button onClick={minus(1)}>minus one</button> |
| 102 | <button onClick={actions.reset}>reset</button> |
| 103 | <InputComponent /> |
| 104 | </div> |
| 105 | ) |
| 106 | } |
| 107 | |
| 108 | ReactDOM.render(<CountComponent />, document.querySelector('#app')) |
nothing calls this directly
no test coverage detected