pomber/didact

flatten children

swyxio opened this issue · 0 comments

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())