Closed
Description
React version: DevTools version 4.12.2-d14b6a4bdd
Steps To Reproduce
- Use
console.warn
from within a React component where the last argument is typeof"symbol"
Link to code example: https://codesandbox.io/s/pedantic-neumann-711ph?file=/src/App.js
The bug only happens when you make a change, so if you use the code sandbox link you need, open a new window, active dev tools, open the React dev tools and then uncomment line 5: // return null
only then will the error actually happen.
I've located the culprit to this line of code
react/packages/react-devtools-shared/src/backend/console.js
Lines 146 to 147 in 0e100ed
And would offer the following change
const alreadyHasComponentStack = typeof lastArg === "string" && isStringComponentStack(lastArg);
The current behavior
React DevTools is implicitly converting a Symbol to a string.
The expected behavior
React DevTools does not implicitly try to convert a Symbol to a string.