Skip to content

JSX.Element is Deprecated  #643

@agroot2002

Description

@agroot2002

In " Typing Component Props " under " Useful React Prop Type Examples " , example given for children Element as props ( JSX.Element ) is incorrect it produce errors in new versions , instead React.ReactElement is suggested method to use .

In " Functional Components " under 3rd example also the JSX.Element is used instead React.ReactElement must be there .

I came across this error and it took me two days to figure this out in my code .
So I don't want someone else to run in the same problem .

children_element function_components

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions