MCPcopy Create free account
hub / github.com/reactjs/react-rails / cloneAndReplaceKey

Function cloneAndReplaceKey

lib/assets/react-source/development/react.js:1200–1203  ·  view source on GitHub ↗
(oldElement, newKey)

Source from the content-addressed store, hash-verified

1198 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
1199 }
1200 function cloneAndReplaceKey(oldElement, newKey) {
1201 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
1202 return newElement;
1203 }
1204 /**
1205 * Clone and return a new ReactElement using element as the starting point.
1206 * See https://reactjs.org/docs/react-api.html#cloneelement

Callers 1

Calls 1

ReactElementFunction · 0.70

Tested by

no test coverage detected