-
Notifications
You must be signed in to change notification settings - Fork 7
Rules to create a React component
Rodrigo Queiroz edited this page May 30, 2022
·
1 revision
- It should always be located at
src\components
- Create a folder with the component name and inside it an
index.js
- The name and file name should be capitalized
- Don't create nested components folder like
components/foo/bar/index.js
, except for the icons component folder, all component folders should not be nested - Don't use class components, instead use funcitonal components with hooks
- Don't use JSX, instead use HTM