mirror of
https://github.com/status-im/react-native.git
synced 2025-01-17 21:11:45 +00:00
57d69772b7
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
24 lines
591 B
C++
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
|