-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
[RN] Support findNodeHandle in Fabric #12573
Conversation
// Native | ||
(typeof component === 'object' && '_nativeTag' in component) || | ||
// Composite | ||
(component.render != null && typeof component.render === 'function'), |
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 always falsy according to the branch above. So never can pass. This must throw?
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.
lol. brb going to add a function to Number.prototype.render
} | ||
} | ||
|
||
ReactFabric.render(<Component />, 11); |
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.
let inst =?
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 think we wanted to get rid of that at some point. I should probably use a ref though.
let findHostInstanceFabric = function(fiber: Fiber): any { | ||
return null; | ||
}; | ||
|
||
export function injectFindHostInstance(impl: (fiber: Fiber) => any) { | ||
findHostInstance = impl; |
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.
Do these not overwrite each other if called twice?
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.
They're in separate bundles but I'm going to do a follow up that doesn't use injection and uses instantiation instead.
This doesn't actually need to share any state because it goes through the instance to the fiber structure. Since Fabric is on the same version as RN, calling it on either renderer works.
9f984c2
to
5f9d7f2
Compare
This doesn't actually need to share any state because it goes through the instance to the fiber structure. Since Fabric is on the same version as RN, calling it on either renderer works.
This doesn't actually need to share any state because it goes through the instance to the fiber structure. Since Fabric is on the same version as RN, calling it on either renderer works.