mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
Allow multiple stateless components in a single file
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
## Basic Rules
|
||||
|
||||
- Only include one React component per file.
|
||||
- However, multiple [Stateless, or Pure, Components](https://facebook.github.io/react/docs/reusable-components.html#stateless-functions) are allowed per file. eslint rule: [`react/no-multi-comp`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md#ignorestateless).
|
||||
- Always use JSX syntax.
|
||||
- Do not use `React.createElement` unless you're initializing the app from a file that is not JSX.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user