Cleanup a bunch of the JS stuff

Summary: Stricter flow typing, better naming, modularization with context objects, more extensible, etc.

Reviewed By: yungsters

Differential Revision: D10443440

fbshipit-source-id: 171358dfb105829b872d6379064ba4bc29ce34de
This commit is contained in:
Spencer Ahrens authored and Facebook Github Bot committed 2018-11-05 15:43:55 -08:00
1 parent 7b5277bb75
commit ccc8a425ad
2 files changed
+5 -5

No files matched your search

@@ -55,7 +55,7 @@ SharedShadowNode ReactBytecodeInterpreter::runCommand(
componentDescriptorRegistry[parentShadowNode];
componentDescriptor->appendChild(parentShadowNode, nodes[tag]);
}
} else if (opcode == "childSetNode") {
} else if (opcode == "returnRoot") {
LOG(INFO)
<< "(stop) UITemplateProcessor inject serialized 'server rendered' view tree";
return nodes[command[1].asInt()];
@@ -138,9 +138,9 @@ SharedShadowNode ReactBytecodeInterpreter::buildShadowTree(
<< folly::toJson(command) << "': '" << e.what() << "'";
}
}
LOG(ERROR) << "react ui template missing childSetNode command :(";
LOG(ERROR) << "react ui template missing returnRoot command :(";
throw std::runtime_error(
"Missing childSetNode command in template content:\n" + content);
"Missing returnRoot command in template content:\n" + content);
return SharedShadowNode{};
}