Skip to content

flatten children #11

@swyxio

Description

@swyxio

sometimes children can be arrays:

<div>
{posts.map(post => <p>{post}</p>)}
</div>

this causes problems for didact.

the solution is to just flatten children:

 reconcileChildren(fiber, fiber.props.children.flat())

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