Answer the question
In order to leave comments, you need to log in
How does a component wrapped in @observer know which properties to watch?
Understanding how mobx works internally.
Interested in how the component learns to monitor the property store.test
and reacts to changes?
import React, { Component } from 'react';
import { observer } from 'mobx-react';
import store from 'store/index';
export default @observer class extends Component {
render() {
return (
<div>
{store.test}
</div>
);
}
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question