text: //  Copyright © 2016 Viro Media. All rights reserved.
  //
  //  Permission is hereby granted, free of charge, to any person obtaining
  //  a copy of this software and associated documentation files (the
  //  "Software"), to deal in the Software without restriction, including
  //  without limitation the rights to use, copy, modify, merge, publish,
  //  distribute, sublicense, and/or sell copies of the Software, and to
  //  permit persons to whom the Software is furnished to do so, subject to
  //  the following conditions:
  //
  //  The above copyright notice and this permission notice shall be included
  //  in all copies or substantial portions of the Software.
  //
  //  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  //  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  //  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  //  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  //  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  //  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  //  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  
  #import <UIKit/UIKit.h>
  
  #import <yoga/Yoga.h>
  #import <React/RCTRootView.h>
  #import <React/RCTShadowView.h>
  #import "VRTView.h"
  
  
  @class RCTSparseArray;
  
  typedef NS_ENUM(NSUInteger, VRTUpdateLifecycle) {
    VRTUpdateLifecycleUninitialized = 0,
    VRTUpdateLifecycleComputed,
    VRTUpdateLifecycleDirtied,
  };
  
  typedef void (^VRTApplierBlock)(NSDictionary<NSNumber *, VRTView *> *viewRegistry);
  
  /**
   * ShadowView tree mirrors RCT view tree. Every node is highly stateful.
   * 1. A node is in one of three lifecycles: uninitialized, computed, dirtied.
   * 1. RCTBridge may call any of the padding/margin/width/height/top/left setters. A setter would dirty
   *    the node and all of its ancestors.
   * 2. At the end of each Bridge transaction, we call collectUpdatedFrames:widthConstraint:heightConstraint
   *    at the root node to recursively lay out the entire hierarchy.
   * 3. If a node is "computed" and the constraint passed from above is identical to the constraint used to
   *    perform the last computation, we skip laying out the subtree entirely.
   */
  @interface VRTShadowView : RCTShadowView
   
  
  @property (nonatomic, weak, readonly) VRTShadowView *superview;
  
  
  @end
  
  