Closed barbalex closed 4 years ago
Ouch, thanks for the report, small typo. It should be fixed in 2.0.1 I just published.
Thanks @FredyC
v2.0.1 corrects the error. I have now added import 'mobx-react-lite/batchingForReactDom'
to index.js (https://github.com/barbalex/awel-personal/blob/master/src/index.js#L4) and the app starts up correctly. But I am still getting the friendly message in the console:
[MobX] You haven't configured observer batching which might result in unexpected behavior in some cases. See more at https://github.com/mobxjs/mobx-react-lite/#observer-batching
@barbalex That's strange, I tried to reproduce here and it works correctly. Are you sure you don't have anything cached somewhere?
Will that also be fixed in mobx-react
? 6.2.0
throws same error.
@prymitive The mobx-react does not have a hard dependency on 2.0.0, so if you managed to install deps before 2.0.1 got out, you need to force the update I think. With Yarn it's yarn --force
, not so sure about NPM.
[MobX] You haven't configured observer batching which might result in unexpected behavior in some cases. See more at https://github.com/mobxjs/mobx-react-lite/#observer-batching
@barbalex is your problem somehow related to #271 ? I use Typescript in my project so maybe that messes something up with the import
statement (I have described my findings in the Research
section)
Well, to be honest, I have no idea what could mess with my import statements. This project was ported from electron-react-boilerplate to electron-forge. It uses webpack. But don't ask me what is going on under the hub 🙄
@barbalex well, @FredyC just released 2.0.2
which solved my problem so maybe you can try out now :)
Yep, version 2.0.2 solved it for me too. Thanks you all! Especially @FredyC who seems to be involved in a whole bunch of interesting projects 👏
Intended outcome
I updated mobx-react-lite from v1.5.2 to v2.0.0. Then after running
yarn dev
I saw a friendly message in the console and so addedimport 'mobx-react-lite/batchingForReactDom'
to the index.js file.Expected the app to work as before.
Actual outcome
After running
yarn dev
I got a blank screen and this error in the console:How to reproduce the issue
This is an electron project built with electron-forge. I am not sure how to build something helpful and reproducible.
Versions
Here is my package.json: https://github.com/barbalex/awel-personal/blob/master/package.json