Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNamespace 'React' has no exported member 'RefForwardingComponent'. #263
Labels
Comments
That looks like some issue on your side given that interface is still exported in the latest version. PR is welcome nonetheless to fix deprecation. |
You're right, it was something in my configuration. Sorry. |
nulladdict
added a commit
to nulladdict/mobx-react-lite
that referenced
this issue
Apr 21, 2020
Update react and react-dom types Use ForwardRefRenderFunction instead of RefForwardingComponent Closes mobxjs#263
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Intended outcome
I'm building an application, and after doing some work with MobX, I ran a production build to ensure everything was working as expected, but it errored out. Development build does work exactly as intended, however.
Actual outcome
I get the following error:
How to reproduce the issue
Creating a simple component will trigger the issue:
Nothing more advanced than this needed.
Versions
Browsing through @types/react, I did notice they deprecated
RefForwardingComponent
, but even going to an older version (16.9.19
) didn't fix this problem. Strangely, if I editobserver.d.ts
innode_modules
, and import React there (import React from 'react';
), the production build works just fine. Just something I noticed.