We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Intended outcome: No errors
Actual outcome:
Running the following command
tsc --project tsconfig.json --noEmit
on a typescript project would result in the following issues.
node_modules/mobx-react-lite/dist/observer.d.ts:5:84 - error TS2694: Namespace 'React' has no exported member 'RefForwardingComponent'. export declare function observer<P extends object, TRef = {}>(baseComponent: React.RefForwardingComponent<TRef, P>, options: IObserverOptions & { ~~~~~~~~~~~~~~~~~~~~~~ node_modules/mobx-react-lite/dist/observer.d.ts:10:81 - error TS2694: Namespace 'React' has no exported member 'RefForwardingComponent'. export declare function observer<C extends React.FunctionComponent<any> | React.RefForwardingComponent<any>, Options extends IObserverOptions>(baseComponent: C, options?: Options): Options extends { ~~~~~~~~~~~~~~~~~~~~~~ node_modules/mobx-react-lite/dist/observer.d.ts:12:21 - error TS2694: Namespace 'React' has no exported member 'RefForwardingComponent'. } ? C extends React.RefForwardingComponent<infer TRef, infer P> ? C & React.MemoExoticComponent<React.ForwardRefExoticComponent<React.PropsWithoutRef<P> & React.RefAttributes<TRef>>> : never : C & {
How to reproduce the issue:
Apolegies for the lack of codesandbox, however, this is related to other projects that are having similar issues when upgrading to react 18.
This comes down to this particular commit... DefinitelyTyped/DefinitelyTyped#56210
RefForwardingComponent was removed with no replacement, hopefully this can be fixed one way or another.
Versions "react": "^18.0.0", "react-dom": "^18.0.0", "@types/react": "^18.0.5", "@types/react-dom": "^18.0.1", "mobx": "^6.5.0", "mobx-react": "^7.3.0",
The text was updated successfully, but these errors were encountered:
Thanks for the issue. We already have a related PR to fix it: #2741
Sorry, something went wrong.
Should be fixed by todays release mobx@7.4.0 / mobx-react-lite@3.4.0
Thanks, I had the same problem
No branches or pull requests
Intended outcome:
No errors
Actual outcome:
Running the following command
on a typescript project would result in the following issues.
How to reproduce the issue:
Apolegies for the lack of codesandbox, however, this is related to other projects that are having similar issues when upgrading to react 18.
This comes down to this particular commit...
DefinitelyTyped/DefinitelyTyped#56210
RefForwardingComponent was removed with no replacement, hopefully this can be fixed one way or another.
Versions
"react": "^18.0.0",
"react-dom": "^18.0.0",
"@types/react": "^18.0.5",
"@types/react-dom": "^18.0.1",
"mobx": "^6.5.0",
"mobx-react": "^7.3.0",
The text was updated successfully, but these errors were encountered: