-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compat does not export all members that @types/react does #2414
Comments
I have the same problem after mobx-react 6.1.8. |
We've had a couple of issues about this, so I'll close this one for now Here's a possible workaround |
If you could try out the changes in #2329 and report there if that fixes it that would also help |
Neither of those actually export even 1 out of the 4 interfaces needed, so they both fail, while the first solution starts to break other libraries too. I don't quite see how this can be closed when no solution is offered that works. |
cause it's very similar to existing issues, it's not closed because it's solved i.e. #2222 |
Workaround here: #2150 (comment). You may need to customize it. I agree it's not a great situation, so please upvote the issues, both this one and #2222 and #2150. |
Reproduction
I'm currently attempting to use MobX (specificially, mobx-react-lite) in a Preact app, and I'm running into trouble with some of the interfaces it requires.
Versions
Steps to reproduce
Wrapping a MobX observer around a functional component will cause this issue:
Expected Behavior
The app should be able to be built.
Actual Behavior
I received this error after trying to do a production build of the app (note: it does work as expected in develop):
After opening up
node_modules/mobx-react-lite/dist/observer.d.ts
, this is what I found:There are errors on
RefForwardingComponent
,MemoExoticComponent
,PropsWithoutRef
, andRefAttributes
, as none of these items are exported from compat's React namespace.My question is how do I solve this, or is this something I can even solve on my own end?
The text was updated successfully, but these errors were encountered: