MCPcopy Create free account
hub / github.com/Lucifier129/react-lite / legacySetProps

Function legacySetProps

examples/simple/react.js:6328–6340  ·  view source on GitHub ↗
(partialProps, callback)

Source from the content-addressed store, hash-verified

6326}
6327
6328function legacySetProps(partialProps, callback) {
6329 var component = this._reactInternalComponent;
6330 if ("development" !== 'production') {
6331 "development" !== 'production' ? warning(false, 'ReactDOMComponent: Do not access .setProps() of a DOM node. ' + 'Instead, call ReactDOM.render again at the top level.%s', getDeclarationErrorAddendum(component)) : undefined;
6332 }
6333 if (!component) {
6334 return;
6335 }
6336 ReactUpdateQueue.enqueueSetPropsInternal(component, partialProps);
6337 if (callback) {
6338 ReactUpdateQueue.enqueueCallbackInternal(component, callback);
6339 }
6340}
6341
6342function legacyReplaceProps(partialProps, callback) {
6343 var component = this._reactInternalComponent;

Callers

nothing calls this directly

Calls 2

warningFunction · 0.50

Tested by

no test coverage detected