-
Notifications
You must be signed in to change notification settings - Fork 49.6k
[Fiber] Implement findDOMNode and isMounted #8083
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
Changes from all commits
298d0c3
2e040fc
1376048
1914f94
d5752ac
8e2d7f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,12 +119,18 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) { | |
switch (effectfulFiber.effectTag) { | ||
case Placement: { | ||
commitInsertion(effectfulFiber); | ||
// Clear the effect tag so that we know that this is inserted, before | ||
// any life-cycles like componentDidMount gets called. | ||
effectfulFiber.effectTag = NoWork; | ||
break; | ||
} | ||
case PlacementAndUpdate: { | ||
commitInsertion(effectfulFiber); | ||
const current = effectfulFiber.alternate; | ||
commitWork(current, effectfulFiber); | ||
// Clear the effect tag so that we know that this is inserted, before | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this supposed to be the same comment as above? How is setting the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Clearing the "placement" part of it. |
||
// any life-cycles like componentDidMount gets called. | ||
effectfulFiber.effectTag = Update; | ||
break; | ||
} | ||
case Update: { | ||
|
@@ -156,6 +162,8 @@ module.exports = function<T, P, I, TI, C>(config : HostConfig<T, P, I, TI, C>) { | |
// and lastEffect since they're on every node, not just the effectful | ||
// ones. So we have to clean everything as we reuse nodes anyway. | ||
effectfulFiber.nextEffect = null; | ||
// Ensure that we reset the effectTag here so that we can rely on effect | ||
// tags to reason about the current life-cycle. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment doesn't apply to the line below anymore. It used to refer to |
||
effectfulFiber = next; | ||
} | ||
|
||
|
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.
TI
~=TextInstance
?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.
Yea