RCTComponentEvent.h 663 B

1234567891011121314151617181920212223
  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 <React/RCTEventDispatcher.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. /**
  10. * Generic untyped event for Components. Used internally by RCTDirectEventBlock and
  11. * RCTBubblingEventBlock, for other use cases prefer using a class that implements
  12. * RCTEvent to have a type safe way to initialize it.
  13. */
  14. @interface RCTComponentEvent : NSObject <RCTEvent>
  15. - (instancetype)initWithName:(NSString *)name viewTag:(NSNumber *)viewTag body:(NSDictionary *)body;
  16. NS_ASSUME_NONNULL_END
  17. @end