Nicolò Ribaudo 8dacf85859
Lazily initialize and cache constant JSX elements (#12967)
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>
2021-03-06 17:33:43 +01:00

11 lines
345 B
JavaScript

function render(_ref) {
var _Component;
let text = _ref.text,
className = _ref.className,
id = _ref.id,
props = babelHelpers.objectWithoutProperties(_ref, ["text", "className", "id"]);
// intentionally ignoring props
return () => _Component || (_Component = <Component text={text} className={className} id={id} />);
}