Types error (cannot be used as a JSX component) React 18.2
LeandroGazoli opened this issue · 1 comments
LeandroGazoli commented
NOT work in most recent update of react.
'Ink' cannot be used as a JSX component.
Its instance type 'Ink' is not a valid JSX element.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("**/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode'.
Type 'PromiseLikeOfReactNode' is not assignable to type 'ReactNode'.
LeandroGazoli commented
Temporary solution, add in your file package.json
"resolutions": { "@types/react": "^18.0.8" }
After that a yarn install or npm install