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

Checklist for react components #53

Open
ellisonbg opened this issue Nov 2, 2019 · 0 comments
Open

Checklist for react components #53

ellisonbg opened this issue Nov 2, 2019 · 0 comments
Milestone

Comments

@ellisonbg
Copy link
Contributor

ellisonbg commented Nov 2, 2019

Hi, as I work on this repo, I am finding that the react components are tightly coupled together, making it difficult to understand what is going on and make changes to behavior and styling. Here is a checklist, that will help us to wrangle the components into shape...

  • One component per file, with styles (using typestyle) in that file.
  • Setup storybook and render all components using it to verify independence.
  • Design atoms (buttons, form controls, etc.) should all have 0 margin. Containers should space children using their own padding, and margins on the children (using child selectors).
  • Each component should have a CSS class that matches the name of the component, to make it easy to go back and forth between the rendered app and the code base.
  • Don't use factory functions on components to generate children components - pull those things out into their own components.
  • Use pure functional components unless a class is absolutely needed.
@ellisonbg ellisonbg mentioned this issue Nov 2, 2019
5 tasks
@Zsailer Zsailer added this to the 1.0.0 milestone Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants