mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-23 03:44:13 +08:00
Add YogaNode.create()
Summary: Adds a factory method to `YogaNode`. While this is purely redundant at the moment, it will allow experimentation in follow-up diffs. We will have concrete implementations deriving from `YogaNode` (which will be abstract). Going through `YogaNode.create()` means that we can maintain ABI compatibility. Reviewed By: amir-shalem Differential Revision: D14122974 fbshipit-source-id: 15d92f296d91cc8bbd79a196f370d2dbb69b3f92
This commit is contained in:
committed by
Facebook Github Bot
parent
84a2fb0a4a
commit
7030399ec8
@@ -795,4 +795,12 @@ public class YogaNode implements Cloneable {
|
||||
newNode.mOwner = this;
|
||||
return newNode.mNativePointer;
|
||||
}
|
||||
|
||||
public static YogaNode create() {
|
||||
return new YogaNode();
|
||||
}
|
||||
|
||||
public static YogaNode create(YogaConfig config) {
|
||||
return new YogaNode(config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user