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

Function cloneAndReplaceKey

code/redux/public/app.js:20219–20223  ·  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

20217
20218
20219function cloneAndReplaceKey(oldElement, newKey) {
20220 var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
20221
20222 return newElement;
20223}
20224
20225/**
20226 * 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