-
Notifications
You must be signed in to change notification settings - Fork 649
move code #1
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
Conversation
There where a few (a lot) of internal api usage, most was easy enough to fix
|
cc @gaearon |
Children.map(children, child => child) | ||
.forEach((child) => { | ||
result[child.key] = child; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is preeeety nasty. @gaearon do you have any other suggestions as a replacement for the internal flattenChildren
that was originally used here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does something like Children.toArray(children)
help? I don't actually know this part of the code well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, or at least not fully.
from what I gather, flattenChildren
will return object where the keys are the react key/data-id and values the corresponding children. my code above is attempting to emulate it by running it through Children.map
which flattens and adds keys to unkeyed elements. The forEach turns it into a hash.
The double iteration isn't great, but also we lose the extra debug info that flattenChildren
gave, pointing out duplicates keys.
cc @zpao, how should we handle LICENSE/PATENTS files and copyright headers? |
Wasn't there a question a bit ago about support for raw numbers between CSSCore and dom-helpers? Or is that not applicable here? |
Can we keep it for one version? So that initial release is functionally identical to that provided by React 15. Then we can cut 2.x that drops it. |
sure, no problem |
yes but in case its just using the className utils, not styles |
Let's do it 👍 |
ok last bit added 👍 |
ok released! If all want to get the word out for folks to try it out, to make sure I didn't break anything in the move. |
Do you mind forking the docs too? |
Docs have a separate license: https://github.com/facebook/react/blob/master/LICENSE-docs |
yes eventually, but a bit short on time right now! For now though, i don't think linking to the original docs places should be licensing issue right? |
Sure it's fine. I just mean in case you want to make API changes or anything. Also the docs refer to |
yeah its not a great solution in the medium to long term. We'll get some proper docs up on a gh-pages soon as I have some time to fork and extract the current ones |
I think it's also fine just to copy & paste this on README and leave it on GitHub. |
ha true, I forgot it's all markdown :P |
🎉 This issue has been resolved in version 4.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Moving code over from fb/react
I’m not entirely sure how to handle licensing in this case..