react-component-creator-plugin icon indicating copy to clipboard operation
react-component-creator-plugin copied to clipboard

React template componentCamelcaseName variable is actually componentPascalCaseName

Open Cry0nicS opened this issue 5 years ago • 2 comments

From the readme

{{componentCamelcaseName}} - Camelcased input my-component becomes MyComponent

That's not entirely correct.

PascalCase: NewComponent; camelCase: newComponent;

The reason I mention this is because I would like to request - if it's not too much hassle for you - to also have an actual componentCamelcaseName variable.

The reason behind my request is that I'm using react with scss modules. As a result, here's my use case I import my styles with

import styles from "./my-component.module.scss";

And I use it like

return (<div className={styles.myComponent}/>);

In order to be able to template myComponent I would need a componentCamelcaseName.

But yeah, either way, the current variable should be renamed to componentPascalCaseName

Thanks for your work and effort.

Cry0nicS avatar Oct 22 '20 08:10 Cry0nicS

Hi @Cry0nicS thanks for reaching out. I'll try to implement this feature/bugfix this weekend. I'll keep you updated here

  • fabs

faebeee avatar Oct 22 '20 08:10 faebeee

This should be fixed with https://github.com/component-creator-plugin/react-component-creator-plugin/releases/tag/v0.6.0

The plugin has been submitted to JetBrains and I'm waiting their approval. In the meanwhile you can test the install the plugin from the release page.

Let me know if this improves the usability for your templates.

Regards Fabs

faebeee avatar Oct 24 '20 20:10 faebeee