The State Initializer Pattern
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.
Sources
- T2The State Initializer PatternMartin Fowler / Overreacted / Kent C. Dodds / Josh Comeau