-
Notifications
You must be signed in to change notification settings - Fork 76
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
Single element children props is not an array with preact #132
Labels
Comments
jmatsushita
added a commit
to iilab/pux-todomvc
that referenced
this issue
Jun 27, 2017
jmatsushita
added a commit
to iilab/pux-todomvc
that referenced
this issue
Jun 27, 2017
Oh, it seems that the children is not an array when it is a single element. i.e. when passed a two element children then both branches work the same. |
jmatsushita
changed the title
Children props is not an array with preact
Single element children props is not an array with preact
Jun 27, 2017
jmatsushita
added a commit
to iilab/purescript-pux
that referenced
this issue
Jun 27, 2017
I've added a failing travis test in this fork's pull request |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
I've reproduced the problem I alluded to in #131 about differences between preact and react.
Basically it seems that when passing a children array in preact it is passed as a VNode with children whereas in React it is passed as an array of objects.
I'm shortly pushing two forks of the todomvc example that I used to reproduce the problem. They use a simple React component wrapper that replaces the ul element that holds the todo items and logs the children prop to the console.
In preact the console shows:
While in react:
This causes some problems interoperating with React components that expect an Array here. At first it seemed related to module aliasing but in the end I don't think it is.
Any thoughts if this is a pux problem or an upstream problem?
Jun
The text was updated successfully, but these errors were encountered: