RCTMountingManager.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 <UIKit/UIKit.h>
  8. #import <React/RCTMountingManagerDelegate.h>
  9. #import <React/RCTPrimitives.h>
  10. #import <react/core/ComponentDescriptor.h>
  11. #import <react/core/ReactPrimitives.h>
  12. #import <react/mounting/MountingCoordinator.h>
  13. #import <react/mounting/ShadowView.h>
  14. NS_ASSUME_NONNULL_BEGIN
  15. @class RCTComponentViewRegistry;
  16. /**
  17. * Manages mounting process.
  18. */
  19. @interface RCTMountingManager : NSObject
  20. @property (nonatomic, weak) id<RCTMountingManagerDelegate> delegate;
  21. @property (nonatomic, strong) RCTComponentViewRegistry *componentViewRegistry;
  22. /**
  23. * Schedule a mounting transaction to be performed on the main thread.
  24. * Can be called from any thread.
  25. */
  26. - (void)scheduleTransaction:(facebook::react::MountingCoordinator::Shared const &)mountingCoordinator;
  27. /**
  28. * Dispatch a command to be performed on the main thread.
  29. * Can be called from any thread.
  30. */
  31. - (void)dispatchCommand:(ReactTag)reactTag commandName:(NSString *)commandName args:(NSArray *)args;
  32. - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag
  33. changedProps:(NSDictionary *)props
  34. componentDescriptor:(const facebook::react::ComponentDescriptor &)componentDescriptor;
  35. @end
  36. NS_ASSUME_NONNULL_END