You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type '(permissions: Permissions) => JSX.Element[]' is not assignable to type 'ReactNode'.ts(2322)
App.tsx(119, 9): Did you mean to call this expression?
const fetchResources: (permissions: Permissions) => JSX.Element[]
This happens with an upgrade to @types/react@18.2.51
It was fine before, with @types/react@17.0.43
Workaround:
(more to prouve the origin of the problem):
Add into node_modules\@types\react\index.d.ts, for type ReactNode =:
Indeed, it can be reproduced straight from the sandbox! 😅
We'll look into it, thanks!
It's also worth mentioning that this may have been fixed already on the next branch, since we upgraded our monorepo to use React 18 for the upcoming v5.
We need to check whether this fix could be applied to the master branch too, or if it requires a breaking change.
A typescript error appears on:
This happens with an upgrade to
@types/react@18.2.51
It was fine before, with
@types/react@17.0.43
Workaround:
Add into
node_modules\@types\react\index.d.ts
, fortype ReactNode =
:This option was removed in v18, as stated in Remove {} from ReactFragment
Environment
The text was updated successfully, but these errors were encountered: