Skip to content

Does mobx makeAutoObservable() recurse? #3250

Answered by mweststrate
Lechros asked this question in Q&A
Discussion options

You must be logged in to vote
  1. no, every class should mark it's own fields. 2. yes it will be converted automatically.

TL,DR makeObservable is recursive, but only for built-ins: Map, Array, Set, and all objects that are not class instances (aka. plain objects; their prototype is null or Object)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Lechros
Comment options

@urugator
Comment options

@kubk
Comment options

Answer selected by Lechros
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants