my-component.js import React from 'react'
export default class Home extends React.Component {
  render() {
    return <div>Hello World</div>
  }
}
9
Transform Anonymous Components into Named Components
name-default-component
Terminal npx @next/codemod name-default-component
Versions 9 and above.
Transforms anonymous components into named components to make sure they work with Fast Refresh.
For example:
my-component.js export default function () {
  return <div>Hello World</div>
}
Transforms into:
my-component.js export default function MyComponent() {
  return <div>Hello World</div>
}
The component will have a camel-cased name based on the name of the file, and it also works with arrow functions.
8
Transform AMP HOC into page config
withamp-to-config
Terminal npx @next/codemod withamp-to-config