Skip to content

Conversation

@lfades
Copy link

@lfades lfades commented Jul 17, 2020

Note: The codemod name is a wip

A codemod to add a camel cased name based on the file to anonymous functions and arrow functions. If the name already exists it appends Component to the name. Check the test cases to see the accepted cases and exceptions.

The main purpose for the change described above is to have an easier migration of components to support Fast Refresh.

Class components and create-react-class aren't the target of this codemod as it won't make a difference for Fast Refresh.

TODO: update readme

@lfades
Copy link
Author

lfades commented Jul 17, 2020

Closing in favor of adding the codemod directly to Next.js, as we currently need it.

@lfades lfades closed this Jul 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant