General
The State Initializer Pattern
Kent C. Dodds0 views
A simple pattern used in libraries like downshift and ReachUI to enable component/hook users to initialize your state and even reset it to that initial value.
Source:https://kentcdodds.com/blog/the-state-initializer-pattern