-
Notifications
You must be signed in to change notification settings - Fork 801
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
Update related issues #977
Conversation
@@ -214,8 +216,13 @@ const mergeInject = (a, b, instance) => { | |||
|
|||
const transformFlowNode = flow => | |||
flow.reduce((acc, node) => { | |||
if (isFragmentNode(node) && node.props && node.props.children) { | |||
return [...acc, ...filterNullArray(asArray(node.props.children))] | |||
if (node && isFragmentNode(node)) { |
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 a case Fragment inside a div.
@@ -279,6 +286,15 @@ const hotReplacementRender = (instance, stack) => { | |||
|
|||
// text node | |||
if (typeof child !== 'object' || !stackChild || !stackChild.instance) { | |||
if (stackChild && stackChild.children && stackChild.children.length) { |
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 a important moment, we dont log.
@@ -296,11 +312,20 @@ const hotReplacementRender = (instance, stack) => { | |||
return | |||
} | |||
|
|||
if (typeof child.type !== 'function') { | |||
// React context consumer |
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 am unsure about this. The value, stored in the type
is not "right".
Might be it is better to dive into children on hydrated instance.
child.type[REACT_CONTEXT_CURRENT_VALUE], | ||
), | ||
}) | ||
} catch (e) { |
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.
Might fail. Lets secure it.
Codecov Report
@@ Coverage Diff @@
## master #977 +/- ##
==========================================
- Coverage 89.21% 88.73% -0.49%
==========================================
Files 30 30
Lines 742 772 +30
Branches 170 184 +14
==========================================
+ Hits 662 685 +23
- Misses 66 72 +6
- Partials 14 15 +1
Continue to review full report at Codecov.
|
Gonna fix #979 and then merge this one (as long it introduces it) |
This PR solves
div
(not reported)The main change - SFC are Components yet again - hot-reconciliation is far from a perfect and we have to have smart "self-updatable" components.
PS: This is minor release.