Skip to content

How does work specifying map of annotations? #3740

Answered by urugator
dSalieri asked this question in General
Discussion options

You must be logged in to vote

When you use these functions as annotations, you should think of them as symbols, like so:

if (annotation === observable) {
  // some logic that defines observable prop
}

In the actual implementation, there are extra props defined on these functions that are being used by makeObservable, but that's an implementation detail. You can't implement your own annotation, there is no public Annotation interface.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dSalieri
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants