Skip to content

Commit c497dd2

Browse files
committed
Sort static methods above constructor for React
I think it makes more sense to put static methods above the constructor in classes. I would like to update the ESLint configuration to match this, but it looks like the react/sort-comp rule does not support it quite yet. jsx-eslint/eslint-plugin-react#128
1 parent 6e499cc commit c497dd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

react/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@
334334

335335
- Ordering for `class extends React.Component`:
336336

337-
1. `constructor`
338337
1. optional `static` methods
338+
1. `constructor`
339339
1. `getChildContext`
340340
1. `componentWillMount`
341341
1. `componentDidMount`

0 commit comments

Comments
 (0)