React integration
useDebugValue
Displays a custom Hook debug value in React DevTools.
Formal Syntax & Structure
react syntaxreact
useDebugValue(compact, value => value ? "Compact" : "Comfortable")Working Example
Example Snippetreact
useDebugValue(compact, value => value ? "Compact" : "Comfortable")