Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mq2thez opened this issue Jul 21, 2020 · 3 comments · May be fixed by #2645 or #3855
Open

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

mq2thez opened this issue Jul 21, 2020 · 3 comments · May be fixed by #2645 or #3855

Comments

@mq2thez
Copy link

mq2thez commented Jul 21, 2020

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.

deleonio added a commit to deleonio/preact that referenced this issue Jul 22, 2020
@deleonio deleonio linked a pull request Jul 24, 2020 that will close this issue
deleonio pushed a commit to deleonio/preact that referenced this issue Jul 28, 2020
deleonio added a commit to deleonio/preact that referenced this issue Sep 29, 2020
@ParSal123
Copy link

Is this issue still open?

@developit
Copy link
Member

Yes. It's unlikely to be fixed, as no issues have ever been opened citing this as a real-world compatibility issue.

@ParSal123
Copy link

Does this mean I can't work on it? I saw the "beginner-friendly" tag.

ParSal123 added a commit to ParSal123/preact that referenced this issue Jan 8, 2023
React's children api map function supports a "context" argument that we
don't.
See preactjs#2644.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants