-
-
Notifications
You must be signed in to change notification settings - Fork 348
Problems getting mobx-react to work with yarn pnp #596
Comments
Ahah thanks @marvinhagemeister 😊 The incriminated import { unstable_batchedUpdates as rdBatched } from "react-dom"
import { unstable_batchedUpdates as rnBatched } from "react-native" I think those are provided for optional builtin integrations with The main problem is that warnings will be emitted if |
Yes, the react-dom and react-native dependencies are peer but optional (typically you will only use one of them, or possibly even none of them). I don't see a quick way to fix it, although in the future those dependencies might be removed completely |
PR to add optional peer dependencies and testing if that makes a difference is welcome! |
Made the PR, but I don't want to dive into the whole PNP thing. @marvinhagemeister can you perhaps try it out with those optional deps? You can use https://github.com/whitecolor/yalc to make installable build on your local machine. |
I think it's safe to close this. As of version 6.2.0, we no longer depend on react-dom directly. If some further issues with Yarn PNP appear, please open a new issue. |
At work we're huge fans of mobx and have been using it without any issues together with react. It's really awesome 👍
We're very excited about the recent work the yarn team did to speed up the package installation process with their recent
Plug'n Play
-effort, but we're running into an issue withmobx-react
because it requiresreact-dom
without declaring it a dependency.This is the error message thrown by yarn:
Summoning @arcanis as he does an awesome job at solving these kind of issues 🎉
The text was updated successfully, but these errors were encountered: