Allocate unique reactTags for RN and Fabric#12587
Allocate unique reactTags for RN and Fabric#12587sebmarkbage merged 1 commit intofacebook:masterfrom
Conversation
229798a to
fd371c9
Compare
sophiebits
left a comment
There was a problem hiding this comment.
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.