You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import MyCustomComponent from "@/components/MyCustomComponent";
Editing the text after generating the refactor stills consume time. Ideally, it should not be like that.
By adding an option on the config, you should enable/disable the switch to use the name of the component in the main file, or use the index naming convention:
{
"usesTypeScript": true,
"usesCssModule": true,
"cssPreprocessor": "scss",
"testLibrary": "Testing Library",
"component": {
"default": {
"customTemplates": {
"component": "scripts/templates/component.tsx",
"test": "scripts/templates/test.tsx"
},
"path": "src/Components",
"withStyle": true,
"withTest": true,
"withStory": false,
"withLazy": false,
"useIndexName:" true // false will use the name of the component
}
}
}
The text was updated successfully, but these errors were encountered:
ErickRodrCodes
changed the title
Define custom name structure to component
Define default name structure to main file component
Jan 24, 2021
Thank you for reading. As you might know, The resultant component follows the following pattern:
the resultant code while importing the component suppose more characters:
import MyCustomComponent from "@/components/MyCustomComponent/MyCustomComponent";
Hypotetical ideal Scenario
Leave the Main file as
index.tsx
rather than the name of the component:By doing that the import becomes more simpler:
import MyCustomComponent from "@/components/MyCustomComponent";
Editing the text after generating the refactor stills consume time. Ideally, it should not be like that.
By adding an option on the config, you should enable/disable the switch to use the name of the component in the main file, or use the
index
naming convention:The text was updated successfully, but these errors were encountered: