Skip to content

Commit

Permalink
Add custom description to CKStatelessComponent
Browse files Browse the repository at this point in the history
Summary: This diff overrides description method on CKStatelessComponent to make sure the debug identifier appears in the componentHierarchyDescription

Reviewed By: kevin0571

Differential Revision: D9934411

fbshipit-source-id: b2e4a04d843c262bed252747510d5edadca15fa1
  • Loading branch information
Oleksii Dykan authored and facebook-github-bot committed Sep 19, 2018
1 parent 6ae6354 commit b3922c4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ComponentKit/Core/CKStatelessComponent.mm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ + (instancetype)newWithView:(const CKComponentViewConfiguration &)view component
return c;
}

- (NSString *)description
{
return [NSString stringWithFormat:@"%@ (%@)", NSStringFromClass([self class]), _identifier];
}

@end

CKComponent *CKCreateStatelessComponent(CKComponent *component, const char *debugIdentifier)
Expand Down

0 comments on commit b3922c4

Please sign in to comment.