Skip to content

React.Children.map调用链 #5

@CyfforPro

Description

@CyfforPro

React.Children.map(props.children, c => [c, [c, [c]]]),不管cb返回的数组有几层,最后总会被平铺成一一维的,即若children为a, b,上述的返回结果为a, a, a, b, b, b
image

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