aweary / react-copy-write

✍️ Immutable state with a mutable API
MIT License
1.79k stars 54 forks source link

Add initialState prop to Provider #26

Closed aweary closed 6 years ago

aweary commented 6 years ago

Allows Provider components to set the initial state value. This is required for some use cases where the initial state is provided through props.

This only initializes the state when the Provider mounts. If the initialState prop is updated it's ignored.