w
Search for React Component Creator
in the plugins settings. Or download the plugin from the release site
If you are not happy with the predefined templates, you can choose your own templates. The templates will be processed with mustache as templating. All variables can also be used for the filenames.
Following variables are available
Component
variable | Description |
---|---|
{{componentName}} | the inputted component name. Without any alterations |
{{componentNameCamelCase}} | camelcased input my-component becomes myComponent |
{{componentNamePascalCase}} | pascalcased input my-component becomes MyComponent |
Reducer
variable | Description |
---|---|
{{componentName}} | Name of the folder |
{{componentNameCamelCase}} | camelcased input my-component becomes myComponent |
{{componentNamePascalCase}} | pascalcased input my-component becomes MyComponent |
{{actionFunctionName}} | Name of the function inside the actions.ts file |
{{mutationType}} | String which will be used as type of the dispatch/mutation |
{{actionTypeName}} | Takes the input of actionFunctionName and capitalizes the first letter and appends Action . From setData becomes SetDataAction |
{{actionTypesEnumName}} | Name used for the action types enum. actionTypesEnumName is the namespace where all mutationType actions are kept |
Follow the Setup Instructions
Icons provided by https://www.iconfinder.com/justicon via https://www.iconfinder.com