Mobx-State-Tree – Assign to Array Type
The solution is to use cast: import { cast } from “mobx-state-tree” // ….. self.stores = cast(stores) This is because MST enables snapshots to be assigned to actual values, and automatically converts them. This doesn’t just apply to arrays, but to all types of values. However, typescript doesn’t have support for an assignment to be … Read more