Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React component scaffolding #152

Open
eric-burel opened this issue Mar 16, 2022 · 0 comments
Open

React component scaffolding #152

eric-burel opened this issue Mar 16, 2022 · 0 comments
Labels

Comments

@eric-burel
Copy link
Collaborator

eric-burel commented Mar 16, 2022

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.

@eric-burel eric-burel changed the title Component generator React component scaffolding Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant