Fix #806 #829
Conversation
@@ -153,7 +153,17 @@ function makeObservableProp(target: any, propName: string): void { | |||
configurable: true, | |||
enumerable: true, | |||
get: function() { | |||
let prevReadState = false; | |||
|
|||
if (_allowStateReadsStart && _allowStateReadsEnd) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mweststrate should we import * as mobx
or this null check is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope. this should work fine
render() { | ||
return <span> | ||
{this.props.a} | ||
<Issue806Component2 propA={this.props.a} propB={this.props.b} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why it was needed, but i've added these 😅
I don't follow why to bump peer dep. It's not like it will force a consumer to install that specific version, only warn about it. Besides, requiring a specific version feels like sort of a breaking change to me. The code has to work with X.0.0 versions. |
Yeah that is the kind of the point, if you bump mobx-react we want ideally want folks to bump mobx is as well to not run into #806
It still does, but in that case you will still suffer from the false positive from #806 |
Btw i think we have broken code. in the past, |
It's already published, but feel free to improve for the next version. |
* Issue #824: convert tests from JavaScript to TypeScript [WIP] * More conversion of tests and resolution of errors Upgrading snapshots * Resolve typescript and react linter issues * Code feedback * Updating testing libraries and using more optional chaining * Resolve conflicts, convert PR #829, and make pretty * Update yarn lock after resolving conflicts with master branch * Linter and TSC fixes
No description provided.