#import "REAAlwaysNode.h" #import "REAUtils.h" #import "REANodesManager.h" #import "REAStyleNode.h" #import "REAModule.h" #import #import #import @implementation REAAlwaysNode { NSNumber * _nodeToBeEvaluated; } - (instancetype)initWithID:(REANodeID)nodeID config:(NSDictionary *)config { if ((self = [super initWithID:nodeID config:config])) { _nodeToBeEvaluated = [RCTConvert NSNumber:config[@"what"]]; REA_LOG_ERROR_IF_NIL(_nodeToBeEvaluated, @"Reanimated: First argument passed to always node is either of wrong type or is missing."); } return self; } - (id)evaluate { [[self.nodesManager findNodeByID:_nodeToBeEvaluated] value]; return @(0); } - (void)update { [self value]; } @end