mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove setNativeProps from core
Summary: Changelog: [internal] Fabric uses view commands instead of setNativeProps. This diff removes what's left of setNativeProps from the core. Reviewed By: JoshuaGross Differential Revision: D24309999 fbshipit-source-id: 70e54f0a984f8c36f77ba2cd59f59fc6923bc832
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5a57a538c9
commit
668cc2fbde
@@ -162,31 +162,6 @@ ShadowNode::Shared UIManager::findNodeAtPoint(
|
||||
getNewestCloneOfShadowNode(*node), point);
|
||||
}
|
||||
|
||||
void UIManager::setNativeProps(
|
||||
ShadowNode const &shadowNode,
|
||||
RawProps const &rawProps) const {
|
||||
SystraceSection s("UIManager::setNativeProps");
|
||||
|
||||
auto &componentDescriptor = shadowNode.getComponentDescriptor();
|
||||
auto props = componentDescriptor.cloneProps(shadowNode.getProps(), rawProps);
|
||||
|
||||
shadowTreeRegistry_.visit(
|
||||
shadowNode.getSurfaceId(), [&](ShadowTree const &shadowTree) {
|
||||
shadowTree.tryCommit(
|
||||
[&](RootShadowNode const &oldRootShadowNode) {
|
||||
return std::static_pointer_cast<RootShadowNode>(
|
||||
oldRootShadowNode.cloneTree(
|
||||
shadowNode.getFamily(),
|
||||
[&](ShadowNode const &oldShadowNode) {
|
||||
return oldShadowNode.clone({
|
||||
/* .props = */ props,
|
||||
});
|
||||
}));
|
||||
},
|
||||
true);
|
||||
});
|
||||
}
|
||||
|
||||
LayoutMetrics UIManager::getRelativeLayoutMetrics(
|
||||
ShadowNode const &shadowNode,
|
||||
ShadowNode const *ancestorShadowNode,
|
||||
|
||||
@@ -102,9 +102,6 @@ class UIManager final : public ShadowTreeDelegate {
|
||||
SurfaceId surfaceId,
|
||||
const SharedShadowNodeUnsharedList &rootChildren) const;
|
||||
|
||||
void setNativeProps(ShadowNode const &shadowNode, RawProps const &rawProps)
|
||||
const;
|
||||
|
||||
void setJSResponder(
|
||||
const ShadowNode::Shared &shadowNode,
|
||||
const bool blockNativeResponder) const;
|
||||
|
||||
@@ -634,24 +634,6 @@ jsi::Value UIManagerBinding::get(
|
||||
});
|
||||
}
|
||||
|
||||
if (methodName == "setNativeProps") {
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
name,
|
||||
2,
|
||||
[uiManager](
|
||||
jsi::Runtime & runtime,
|
||||
jsi::Value const &thisValue,
|
||||
jsi::Value const *arguments,
|
||||
size_t count) noexcept->jsi::Value {
|
||||
uiManager->setNativeProps(
|
||||
*shadowNodeFromValue(runtime, arguments[0]),
|
||||
RawProps(runtime, arguments[1]));
|
||||
|
||||
return jsi::Value::undefined();
|
||||
});
|
||||
}
|
||||
|
||||
if (methodName == "configureNextLayoutAnimation") {
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
|
||||
Reference in New Issue
Block a user