use-debugger-hooks
use-debugger-hooks copied to clipboard
Potential next version change
Recently, it dawned on me that a nicer API might be the following:
- rename the hooks to match React's exactly
- import the package with a namespace
If the hook names match and we import with a namespace, then it's a one name replacement to swap them, like so:
import React from 'react'
import * as debug from 'use-debugger-hooks'
function MyComponent({ someProp }) {
const myCallback = debug.useCallback(() => {
someProp()
}, [someProp])
return // ... some jsx
}
This would make the experience even simpler.