davesnx/babel-plugin-transform-react-qa-classes

Add PascalCase

doasync opened this issue · 6 comments

React component usually follows PascalCase naming convention.

When an element type starts with a lowercase letter, it refers to a built-in component like

or and results in a string 'div' or 'span' passed to React.createElement. Types that start with a capital letter like compile to React.createElement(Foo) and correspond to a component defined or imported in your JavaScript file.

We recommend naming components with a capital letter. If you do have a component that starts with a lowercase letter, assign it to a capitalized variable before using it in JSX.

I'm happy to give the ability to create any transformation on the componentName.

Seems like an easy task!

Feel free to add a PR with this change.

Thanks! Could you please update README?

Update the README with what?

Update the README with what?

The format can be: "pascal" (PascalCase)

Sure!