Files
react-native/React
Valentin SherginandFacebook Github Bot 93ded152d9 Fabric: Introducing RCTComponentViewDescriptor
Summary:
This diff introduces RCTComponentViewDescriptor - the container for a view and associated with this view properties which mounting infra uses for bookkeeping (and recycling) views.
The previous implementation used raw Objective-C pointers to `UIView`s to store and manipulate them. The new way has a bunch of advantages:
* It allows using high-performant C++ data collections for storing views and their properties (in future diffs).
* The new approach allows us to avoid hacks around NSMapTable (such as ` [_registry setObject:componentView forKey:(__bridge id)(void *)tag];`) that were needed because NSMapTable wasn't designed for our use-case.
* Dealing with `RCTComponentViewDescriptor` which stores a pointer to a view sometimes is actually more efficient than dealing with those pointers themselfs because we can deal with `const &` to a descriptor which does not require a ref-counter bump.
* A new approach is much more flexible, it allows us to store additional data alongside view instances which we will use in coming diffs.

Changelog: [Internal] Fabric-specific internal change.

Reviewed By: sammy-SC

Differential Revision: D18217102

fbshipit-source-id: 063e6c7df794a2e1fd690c194fb31ad6833eaba7
2019-11-01 09:38:24 -07:00
..
2019-10-30 12:23:25 -07:00
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-10-30 12:23:25 -07:00
2019-10-16 10:06:34 -07:00
2019-10-16 10:06:34 -07:00
2019-11-01 08:49:26 -07:00