Skip to content

Differences in Preact.Children API and React.Children API #2644

@mq2thez

Description

@mq2thez

Hey friends!

I noticed a small difference in how React.Children is implemented between preact/compat and React.

preact/compat children: https://github.com/preactjs/preact/blob/master/compat/src/Children.js#L3
react children: https://github.com/facebook/react/blob/121af3143c7164a196420b080cb31d0ef07d5dff/packages/react/src/ReactChildren.js#L223

The different here being that the React implementation allows for a context arg, while the preact/compat version does not. While it's easily fixable on our end, it seemed like the kind of thing which might lead to incompatibilities in library code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions