MCPcopy Create free account
hub / github.com/microsoft/SandDance / cloneAndReplaceKey

Function cloneAndReplaceKey

docs/external/js/react.development.js:894–897  ·  view source on GitHub ↗
(oldElement, newKey)

Source from the content-addressed store, hash-verified

892 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
893 }
894 function cloneAndReplaceKey(oldElement, newKey) {
895 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
896 return newElement;
897 }
898 /**
899 * Clone and return a new ReactElement using element as the starting point.
900 * See https://reactjs.org/docs/react-api.html#cloneelement

Callers 1

Calls 1

ReactElementFunction · 0.85

Tested by

no test coverage detected