mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### What?
Implements a transform that adds readable names to anonymous function
expressions in react component functions.
Adding `{ debugFunctionName: true }` to swcOptions will do the trick.
### Why?
x-ref: https://vercel.slack.com/archives/C04TR3U872A/p1721702161121619
### How?
7 lines
154 B
JavaScript
7 lines
154 B
JavaScript
function MyComponent() {
|
|
useLayoutEffect(() => {})
|
|
useEffect(() => {})
|
|
const onClick = useCallback(() => [])
|
|
const computed = useMemo(() => {})
|
|
}
|