Do I need to use "makeObservable" in React components marked with "observer"? #2664
Replies: 1 comment 1 reply
-
yes
…On Wed, Dec 2, 2020 at 1:30 PM Dakota St. Laurent ***@***.***> wrote:
The title is the gist - if I have e.g.
@observer
class MyComponent extends React.Component {
@observable dummy = false;
render () {
return <div>Yo</div>;
}
}
do I need to change it to
@observer
class MyComponent extends React.Component {
@observable dummy = false;
constructor (props) {
super(props);
makeObservable(this);
}
render () {
return <div>Yo</div>;
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2664>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAN4NBDDN6576T4FBPWOWMDSSY6PZANCNFSM4UKP5C7A>
.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Dakkers
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The title is the gist - if I have e.g.
do I need to change it to
Beta Was this translation helpful? Give feedback.
All reactions