- I often pass state to child component (best practice I found)
- keep scope-dependent naming
- decrease boilerplate
- correct types
- doesn't report unused state (because of
...state
) - fixed when doing it like this:const Foo: FC<{ bar: StateRef<number> }> = ({ bar: barState }) => { const [bar, setBar] = barState; return <div />; };