Valentin Shergin 57d69772b7 Fabric: Improved signature of calculateMutationInstructions
Summary: Apparently, `calculateMutationInstructions` must also produce mutation instructions for root node as well. To make it possible we have to change the signature of the function and weak some restrictions in TreeMutationInstruction.

Reviewed By: fkgozali

Differential Revision: D7958248

fbshipit-source-id: 4109a6bce3a77f7eb89157201fd0e80f98487dbd
2018-05-15 23:58:59 -07:00

24 lines
591 B
C++

// Copyright 2004-present Facebook. All Rights Reserved.
#pragma once
#include <fabric/core/ShadowNode.h>
#include <fabric/uimanager/TreeMutationInstruction.h>
namespace facebook {
namespace react {
/*
* Calculates set of mutation instuctions which describe how the old
* ShadowNode tree can be transformed to the new ShadowNode tree.
* The set of instuctions might be and might not be optimal.
*/
void calculateMutationInstructions(
TreeMutationInstructionList &instructions,
SharedShadowNode oldNode,
SharedShadowNode newNode
);
} // namespace react
} // namespace facebook