message: Improve yoga updating
diff: -import { asapScheduler, Observable, Subject } from 'rxjs';
  -import { concatAll, debounceTime, map, mergeAll, observeOn } from 'rxjs/operators';
  +import { Observable, Subject } from 'rxjs';
  +import { concatMap, debounceTime } from 'rxjs/operators';
  import { yogaHandler } from './yogaHandler';
  import { isReactFigmaNode } from './isReactFigmaNode';
  @@ -7,10 +7,23 @@ const $yogaRoot = new Subject();
  export const $updatedYogaCoords = new Subject();
  +export const updateYogaRoot = (root: any) => {
  + $yogaRoot.next(root);
  +};
  +
  +export const updateYogaNode = (node: any) => {
  + const parent = node.parent;
  + if (!parent || !isReactFigmaNode(parent)) {
  + updateYogaRoot(node);
  + } else {
  + updateYogaNode(parent);
  + }
  +};
  +
  $yogaRoot
  .pipe(
  debounceTime(100),
  - map((instance: any) => {
  + concatMap((instance: any) => {
  return new Observable(subscriber => {
  const handleYogaProps = (newProps, instance) => {
  const { children: yogaChildren, ...yogaPropsWithoutChildren } = newProps;
  @@ -22,7 +35,11 @@ $yogaRoot
  subscriber.next({ instance, props: yogaPropsWithoutChildren });
  if (instance.children) {
  instance.children.forEach((child, index) => {
  - handleYogaProps(newProps.children[index], child);
  + if (!yogaChildren || yogaChildren.length < index + 1) {
  + updateYogaNode(child);
  + return;
  + }
  + handleYogaProps(yogaChildren[index], child);
  });
  }
  };
  @@ -31,20 +48,6 @@ $yogaRoot
  subscriber.complete();
  });
  });
  - }),
  - mergeAll(1)
  + })
  )
  .subscribe($updatedYogaCoords);
  -
  -export const updateYogaRoot = (root: any) => {
  - $yogaRoot.next(root);
  -};
  -
  -export const updateYogaNode = (node: any) => {
  - const parent = node.parent;
  - if (!parent || !isReactFigmaNode(parent)) {
  - updateYogaRoot(node);
  - } else {
  - updateYogaNode(parent);
  - }
  -};
  