Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure render units have unique ids across the tree
Summary: Now that we want to track render unit execution, we need to make sure that the associated client id of the render unit signal/scope is globally unique. https://www.internalfb.com/code/fbsource/[D62641845-V1]/fbandroid/libraries/bloks/bloks/src/main/java/com/instagram/common/bloks/signals/Type.kt?lines=65 To do this we need to override the ids of render units produced from the resolve step and layout. The mount phase will read the render unit id (which is now the client id) and use it to track signal accesses NOTE: For layout we only override the id (by wrapping) if the id of the render unit is different from the client id of the model that produced it. We're banking on the reality that ~95% of component implementations use or extend `BloksUntypedRenderUnit` whose render unit id is the same as the client id of the model it was produced from. This way, we can ensure that we're allocating only where necessary. Reviewed By: rooju Differential Revision: D62642517 fbshipit-source-id: 537a1419ec4ba7dd211875a8976c8330bcdbc32c
- Loading branch information