RCTMountingManager.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/ReactPrimitives.h>
  11. #import <react/mounting/ShadowView.h>
  12. #import <react/mounting/ShadowViewMutation.h>
  13. NS_ASSUME_NONNULL_BEGIN
  14. @class RCTComponentViewRegistry;
  15. /**
  16. * Manages mounting process.
  17. */
  18. @interface RCTMountingManager : NSObject
  19. @property (nonatomic, weak) id<RCTMountingManagerDelegate> delegate;
  20. @property (nonatomic, strong) RCTComponentViewRegistry *componentViewRegistry;
  21. /**
  22. * Transfroms mutation insturctions to mount items and execute them.
  23. * The order of mutation tnstructions matters.
  24. * Can be called from any thread.
  25. */
  26. - (void)performTransactionWithMutations:(facebook::react::ShadowViewMutationList)mutations rootTag:(ReactTag)rootTag;
  27. /**
  28. * Suggests preliminary creation of a component view of given type.
  29. * The receiver is free to ignore the request.
  30. * Can be called from any thread.
  31. */
  32. - (void)optimisticallyCreateComponentViewWithComponentHandle:(facebook::react::ComponentHandle)componentHandle;
  33. @end
  34. NS_ASSUME_NONNULL_END