Skip to content

What is the difference with types.model and types.frozen there ? #1825

Answered by Bittttter
Bittttter asked this question in Q&A
Discussion options

You must be logged in to vote

Lol. This is because MobX only tracked with definite properties, so that when I need a data structure as like followed:

interface DS {
    [key: string]: number;
}

MobX can't observed it or I should say MST doesn't support it where use by types.model. Of course I can via types.frozen<Record<string, number>>({}) to mark types and observed the observable.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Bittttter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant