RCTComponentData.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #import <Foundation/Foundation.h>
  8. #import <React/RCTComponent.h>
  9. #import <React/RCTDefines.h>
  10. #import <React/RCTViewManager.h>
  11. @class RCTBridge;
  12. @class RCTShadowView;
  13. @class UIView;
  14. @interface RCTComponentData : NSObject
  15. @property (nonatomic, readonly) Class managerClass;
  16. @property (nonatomic, copy, readonly) NSString *name;
  17. @property (nonatomic, weak, readonly) RCTViewManager *manager;
  18. - (instancetype)initWithManagerClass:(Class)managerClass bridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
  19. - (UIView *)createViewWithTag:(NSNumber *)tag rootTag:(NSNumber *)rootTag;
  20. - (RCTShadowView *)createShadowViewWithTag:(NSNumber *)tag;
  21. - (void)setProps:(NSDictionary<NSString *, id> *)props forView:(id<RCTComponent>)view;
  22. - (void)setProps:(NSDictionary<NSString *, id> *)props forShadowView:(RCTShadowView *)shadowView;
  23. @property (nonatomic, copy, nullable) void (^eventInterceptor)
  24. (NSString *eventName, NSDictionary *event, NSNumber *reactTag);
  25. - (NSDictionary<NSString *, id> *)viewConfig;
  26. @end