Tweak docs for [SKNodeDescriptor -identifierForInvalidation:]

Summary: It took me a few tries to understand what this was for.

Reviewed By: jknoxville

Differential Revision: D20462208

fbshipit-source-id: f6dac7836409c8d4ec1ffb90a74f632624fb68f7
This commit is contained in:
Adam Ernst
2020-03-16 07:24:41 -07:00
committed by Facebook GitHub Bot
parent 89d6dfcf95
commit 70d417b62b

View File

@@ -45,9 +45,13 @@ typedef void (^SKNodeUpdateData)(id value);
- (NSString*)identifierForNode:(T)node; - (NSString*)identifierForNode:(T)node;
/** /**
An ID which is equal between reflowing components is needed to get the When the setData command is received from Flipper to change a node's data,
identifier of root node of a tree which need to be invalidated on an "invalidateWithData" command is sent back to signal that the node has
FlipperKitLayoutPlugin side. changed. However sometimes you may want to invalidate some other node,
not the node that had its data actually modified; usually some ancestor.
This method allows you to substitute another node's identifier.
If you do not override it, the default behavior is to simply return
the node's identifier.
*/ */
- (NSString*)identifierForInvalidation:(T)node; - (NSString*)identifierForInvalidation:(T)node;