by miklosbertalan · 7y ago · 0 comments
1. Always wrap your components with view().
2. Always wrap your state store objects with store().
import React from 'react'
import { store, view } from 'react-easy-state'
const counter = store({
num: 0,
incr: () => counter.num++
})
export default view(() => <button onClick={counter.incr}>{counter.num}</button>)
---This release adds support for the upcoming React hooks.
No comments yet.