Allow multiple stateless components in a single file

This commit is contained in:
Simen Bekkhus
2015-12-27 12:49:53 +01:00
parent 74561b6449
commit 96ef087bdf
2 changed files with 2 additions and 1 deletions

View File

@@ -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.