What is the difference between React's MobX-state-tree's types?

48 Views Asked by At

I'm learning React and using the MobX-state-tree (MST) state manager.

I'm also using TypeScript and want to add types to my MST models without rewriting the properties and actions, but I don't understand what the documentation is saying. It talks about types like Instance<typeof TYPE> and SnapshotOrInstance<typeof TYPE>, but the explanations it provides are not enough for me to grasp when I should use each one.

So, which one should I be using for which situation? What is the difference exactly?

0

There are 0 best solutions below