Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Add more React and Enzyme rules #77

Closed
lemonmade opened this issue Jan 26, 2018 · 1 comment
Closed

Add more React and Enzyme rules #77

lemonmade opened this issue Jan 26, 2018 · 1 comment

Comments

@lemonmade
Copy link
Member

lemonmade commented Jan 26, 2018

  • No useless wrappers (<>{stuff}{andThings}</> > <div>{stuff}{andThings}</div>)
  • React component should make every member private except React API stuff
  • Enzyme no bad features (setState, instance, etc)
  • Don't reach across component boundaries (good: ./components, ../components, components, ../OtherComponent. bad: ../OtherComponent/any-path, ./components/SomeComponent)
  • Avoid renderFoo methods being explicitly called in render() (use components instead)
  • Avoid using most raw DOM manipulation
  • Avoid the word correct in test names
@alexandcote
Copy link
Contributor

alexandcote commented Mar 27, 2020

Most of the issues listed above are now solve. Feel free to reopen an issue if I missed something.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants