mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add description to ConcreteComponentDescriptor::adopt
Summary: changelog: [internal] Reviewed By: javache Differential Revision: D34041312 fbshipit-source-id: 3b6d650034481813273f67444426e2fa5cb7d59f
This commit is contained in:
1 parent
3eddc9abb7
commit
ee454e4f0b
1 file changed
+12
@@ -179,6 +179,18 @@ class ConcreteComponentDescriptor : public ComponentDescriptor {
|
||||
}
|
||||
|
||||
protected:
|
||||
/*
|
||||
* Called immediatelly after `ShadowNode` is created or cloned.
|
||||
*
|
||||
* Override this method to pass information from custom `ComponentDescriptor`
|
||||
* to new instance of `ShadowNode`.
|
||||
*
|
||||
* Example usages:
|
||||
* - Inject image manager to `ImageShadowNode` in
|
||||
* `ImageComponentDescriptor`.
|
||||
* - Set `ShadowNode`'s size from state in
|
||||
* `ModalHostViewComponentDescriptor`.
|
||||
*/
|
||||
virtual void adopt(ShadowNode::Unshared const &shadowNode) const {
|
||||
// Default implementation does nothing.
|
||||
react_native_assert(
|
||||
|
||||
Reference in new issue
Block a user