Typescript improvements and package size reduction
The primary purpose of this release is two fold:
- Automatic model type inference (and overall better/more strict typescript definitions).
- Simplified API (removed
mapState
callback support).
Note that this release introduces significant breaking API changes (hence the 2.0 release).
- Breaking:
useProvider
API changes (see: useProvider) - Breaking:
useCreateStore
API changes (see: useCreateStore) - Breaking:
useStore
API changes (see: useStore)
A more in depth explanation of the typescript changes (the primary driver of these API changes) can be found on the mobx-store-provider typescript documentation.