-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Allocate unique reactTags for RN and Fabric #12587
Conversation
229798a
to
fd371c9
Compare
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.
Why no shared module?
Took this opportunity to remove some abstract overhead. In Fabric it is extra simple since they no longer overlap with root tags.
fd371c9
to
ca5f9d0
Compare
We need to determine from native if it is Fabric or RN. It would require some kind of map storage to do that which is tricky since that would need to be managed by the GC. What is worse, is that we'd need to call into JS to figure this out. |
I mean with the same number structure, just centralized in one file. Makes it more obvious what needs changing next time. |
That requires some injection to set up the incremental parts. Unless I instead duplicate it in that file. Then once we remove one we'll never remove the other. I prefer to write like it would be if this was the future. |
I think at some point (soon), we'll do a code mod where React tag is actually an instance handle pointer (fiber) for Fabric. |
If we ever up this strategy, there are a bunch of places in native that needs to update too. Sprinkled across languages etc. So not sure the duplication here is that bad in context. |
cc @mdvacca |
Took this opportunity to remove some abstract overhead. In Fabric it is extra simple since they no longer overlap with root tags.
We need these number sequences to not overlap and need some way for native to determine which one is which.
Took this opportunity to remove some abstract overhead.
In Fabric it is extra simple since they no longer overlap with root tags.