MCPcopy Index your code
hub / github.com/plotly/dash / printWarning

Function printWarning

dash/deps/react@18.2.0.js:178–201  ·  view source on GitHub ↗
(level, format, args)

Source from the content-addressed store, hash-verified

176 }
177
178 function printWarning(level, format, args) {
179 // When changing this logic, you might want to also
180 // update consoleWithStackDev.www.js as well.
181 {
182 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
183 var stack = ReactDebugCurrentFrame.getStackAddendum();
184
185 if (stack !== '') {
186 format += '%s';
187 args = args.concat([stack]);
188 } // eslint-disable-next-line react-internal/safe-string-coercion
189
190
191 var argsWithFormat = args.map(function (item) {
192 return String(item);
193 }); // Careful: RN currently depends on this prefix
194
195 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
196 // breaks IE9: https://github.com/facebook/react/issues/13610
197 // eslint-disable-next-line react-internal/no-production-logging
198
199 Function.prototype.apply.call(console[level], console, argsWithFormat);
200 }
201 }
202
203 var didWarnStateUpdateForUnmountedComponent = {};
204

Callers 2

warnFunction · 0.70
errorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…