Skip to content

Using FlipMove with TypeScript functional components #271

@borgdrone7

Description

@borgdrone7

Hi,
I am rendering form elements which are functional components and trying to use FlipMove with them like this:

        <FlipMove>
          {components_length ? getComponents(components, dispatch):null}
        </FlipMove>

However I am getting this error:

TS2769: No overload matches this call.   Overload 1 of 2, '(props: FlipMoveProps | Readonly<FlipMoveProps>): FlipMove', gave the following error.     Type '{ children: FormComponent[] | null; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<FlipMove> & Readonly<FlipMoveProps>'.   Overload 2 of 2, '(props: FlipMoveProps, context: any): FlipMove', gave the following error.     Type '{ children: FormComponent[] | null; }' has no properties in common with type 'IntrinsicAttributes & IntrinsicClassAttributes<FlipMove> & Readonly<FlipMoveProps>'

Components are dynamic and very complex and I couldn't make example for functional components in read me work in my case.
Anyone knows how to solve this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions