useDebugValue

Assign a label to custom Hooks

The useDebugValue() Hook is used purely for optimizing the developer’s debugging experience. We call it in the following way:

useDebugValue(value);

It doesn’t create any real value in an application for the end user. useDebugValue() allows us to give custom Hooks a label that we can then inspect in the React DevTools:

Get hands-on with 1400+ tech skills courses.