RCTSurfaceBackedComponentState.mm 555 B

12345678910111213141516171819202122232425262728
  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 "RCTSurfaceBackedComponentState.h"
  8. #import <React/RCTSurface.h>
  9. @implementation RCTSurfaceBackedComponentState
  10. + (instancetype)newWithSurface:(RCTSurface *)surface
  11. {
  12. return [[self alloc] initWithSurface:surface];
  13. }
  14. - (instancetype)initWithSurface:(RCTSurface *)surface
  15. {
  16. if (self = [super init]) {
  17. _surface = surface;
  18. }
  19. return self;
  20. }
  21. @end