[RN] Support findNodeHandle in Fabric#12573
Merged
sebmarkbage merged 1 commit intofacebook:masterfrom Apr 8, 2018
Merged
Conversation
sebmarkbage
commented
Apr 8, 2018
| // Native | ||
| (typeof component === 'object' && '_nativeTag' in component) || | ||
| // Composite | ||
| (component.render != null && typeof component.render === 'function'), |
Contributor
Author
There was a problem hiding this comment.
This is always falsy according to the branch above. So never can pass. This must throw?
Collaborator
There was a problem hiding this comment.
lol. brb going to add a function to Number.prototype.render
sophiebits
approved these changes
Apr 8, 2018
| } | ||
| } | ||
|
|
||
| ReactFabric.render(<Component />, 11); |
Contributor
Author
There was a problem hiding this comment.
I think we wanted to get rid of that at some point. I should probably use a ref though.
| }; | ||
|
|
||
| export function injectFindHostInstance(impl: (fiber: Fiber) => any) { | ||
| findHostInstance = impl; |
Collaborator
There was a problem hiding this comment.
Do these not overwrite each other if called twice?
Contributor
Author
There was a problem hiding this comment.
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 was referenced Apr 17, 2018
This was referenced Apr 19, 2018
rhagigi
pushed a commit
to rhagigi/react
that referenced
this pull request
Apr 19, 2018
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.