Add description to ConcreteComponentDescriptor::adopt

Summary: changelog: [internal]

Reviewed By: javache

Differential Revision: D34041312

fbshipit-source-id: 3b6d650034481813273f67444426e2fa5cb7d59f
This commit is contained in:
Samuel Susla authored and Facebook GitHub Bot committed 2022-02-07 09:03:56 -08:00
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(