# Migration
# v2 to v3
v3 is React concurrent mode safe. There will be no synchronous subscription.
- If synchronous values from observables are used as initial state, move the initialization logic to the
initialState
parameter ofuseObservableState
,useObservablePickState
anduseObservableGetState
. useGetObservableState
andusePickObservableState
signatures are incompatible. The new addedinitialState
is not optional.- If
initialState
is a function it will be called. If you need to use function as state wrap it with an extra function.
# v3 to v4
v4 is not compatible with TypeScript 3.
- remove the readonly modifier of
useObservable
anduseLayoutObservable
dependency list.
# v3.0.0 to v4.2.0
- Errors in Observable will not be automatically re-thrown to Error Boundary. Use
useRenderThrow
explicitly.
← Gotchas