Skip to content

Commit 40880e2

Browse files
committed
add state to lifecyle methods in doc
1 parent bf6daaa commit 40880e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/rules/sort-comp.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ When creating React components it is more convenient to always follow the same o
66

77
With default configuration the following organisation must be followed:
88

9-
1. lifecycle methods: `displayName`, `propTypes`, `contextTypes`, `childContextTypes`, `mixins`, `statics`,`defaultProps`, `constructor`, `getDefaultProps`, `getInitialState`, `getChildContext`, `componentWillMount`, `componentDidMount`, `componentWillReceiveProps`, `shouldComponentUpdate`, `componentWillUpdate`, `componentDidUpdate`, `componentWillUnmount` (in this order).
9+
1. lifecycle methods: `displayName`, `propTypes`, `contextTypes`, `childContextTypes`, `mixins`, `statics`,`defaultProps`, `constructor`, `getDefaultProps`, `getInitialState`, `state`, `getChildContext`, `componentWillMount`, `componentDidMount`, `componentWillReceiveProps`, `shouldComponentUpdate`, `componentWillUpdate`, `componentDidUpdate`, `componentWillUnmount` (in this order).
1010
2. custom methods
1111
3. `render` method
1212

@@ -67,6 +67,7 @@ The default configuration is:
6767
'constructor',
6868
'getDefaultProps',
6969
'getInitialState',
70+
'state',
7071
'getChildContext',
7172
'componentWillMount',
7273
'componentDidMount',

0 commit comments

Comments
 (0)