MCPcopy Create free account
hub / github.com/krasimir/react-in-patterns / cloneAndReplaceKey

Function cloneAndReplaceKey

code/controlled-uncontrolled/public/app.js:18199–18203  ·  view source on GitHub ↗

* Return a function that produces ReactElements of a given type. * See https://reactjs.org/docs/react-api.html#createfactory

(oldElement, newKey)

Source from the content-addressed store, hash-verified

18197
18198
18199function cloneAndReplaceKey(oldElement, newKey) {
18200 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
18201
18202 return newElement;
18203}
18204
18205/**
18206 * Clone and return a new ReactElement using element as the starting point.

Callers 1

Calls 1

ReactElementFunction · 0.70

Tested by

no test coverage detected