A Chrome extension that allows you to toggle the component name display feature in React DevTools. This feature shows component names during re-renders, which can be useful for debugging but might be distracting in some cases.
- Toggle on/off the component name display in React DevTools
- Simple user interface with a toggle switch
- Persists your preference across browser sessions
- Clone or download this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" by toggling the switch in the top right corner
- Click "Load unpacked" and select the directory containing this extension
- The extension should now appear in your extensions list and in the toolbar
- Click on the extension icon in the Chrome toolbar to open the popup
- Use the toggle switch to hide or show component names during re-renders
- The status text will indicate the current state
- The setting will be applied immediately to any open tabs with React applications
The extension modifies the REACT_DEVTOOLS_GLOBAL_HOOK.reactDevtoolsAgent.getComponentNameForHostInstance
function:
- When toggled on (hiding component names), it replaces the function with one that returns
null
- When toggled off (showing component names), it restores the original function