React component scaffolding
eric-burel opened this issue · 0 comments
Is your feature request related to a problem? Please describe.
Components may generate a lot of boilerplate:
- the component itself
- the index.js file when the component is big
- story
- unit test
Describe the solution you'd like
Generate a new component folder using a simple command. We can rely on Josh Comeau approach: https://www.npmjs.com/package/new-component
We would simply need to extend it to stories and unit test, and make sure that the end developer may tweak the code generation system easily (so don't make it an NPM package but maybe a local fake package in "packages").
Extending this package is currently not supported so we'd probably want to have our own solution. There is an open feature request though: joshwcomeau/new-component#16
We could investigate Folderize vs code extension as recommended by @Apollinaire
Describe alternatives you've considered
Snippets. But they can work only file by file and you have to remember the snippet key. They are not easily discoverable.