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
constMyValidComponent=()=>"Components can return strings";render(<MyValidComponent/>)
Results in the following typescript error:
'MyValidComponent' cannot be used as a JSX component.
Its return type '"test" | Element | null' is not a valid JSX element.
Problem description:
The types for this package define render's ui property as ReactElement (here). This doesn't seem right since this excludes all kinds of valid react component return types.
Suggested solution:
render's ui property should be typed as ReactNode instead.
The text was updated successfully, but these errors were encountered:
@testing-library/react
version: 14.2.0Relevant code or config:
Results in the following typescript error:
Problem description:
The types for this package define
render
'sui
property asReactElement
(here). This doesn't seem right since this excludes all kinds of valid react component return types.Suggested solution:
render
'sui
property should be typed asReactNode
instead.The text was updated successfully, but these errors were encountered: