Skip to content

Commit dd22bbe

Browse files
committed
Add order hints to lifecycle hook docs (#3278)
1 parent dbacbe0 commit dd22bbe

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

docs/guides/ComponentLifecycle.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ Consider this route config:
2424

2525
| Component | Lifecycle Hooks called |
2626
|-----------|------------------------|
27-
| App | `componentDidMount` |
28-
| Home | `componentDidMount` |
27+
| App | (2) `componentDidMount` |
28+
| Home | (1) `componentDidMount` |
2929
| Invoice | N/A |
3030
| Account | N/A |
3131

3232
2. Now they navigate from `/` to `/invoices/123`
3333

3434
| Component | Lifecycle Hooks called |
3535
|-----------|------------------------|
36-
| App | `componentWillReceiveProps`, `componentDidUpdate` |
37-
| Home | `componentWillUnmount` |
38-
| Invoice | `componentDidMount` |
36+
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
37+
| Home | (2) `componentWillUnmount` |
38+
| Invoice | (3) `componentDidMount` |
3939
| Account | N/A |
4040

4141
- `App` gets `componentWillReceiveProps` and `componentDidUpdate` because it
@@ -49,9 +49,9 @@ Consider this route config:
4949

5050
| Component | Lifecycle Hooks called |
5151
|-----------|------------------------|
52-
| App | `componentWillReceiveProps`, `componentDidUpdate` |
52+
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
5353
| Home | N/A |
54-
| Invoice | `componentWillReceiveProps`, `componentDidUpdate` |
54+
| Invoice | (2) `componentWillReceiveProps`, (3) `componentDidUpdate` |
5555
| Account | N/A |
5656

5757
All the components that were mounted before, are still mounted, they
@@ -61,10 +61,10 @@ Consider this route config:
6161

6262
| Component | Lifecycle Hooks called |
6363
|-----------|------------------------|
64-
| App | `componentWillReceiveProps`, `componentDidUpdate` |
64+
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
6565
| Home | N/A |
66-
| Invoice | `componentWillUnmount` |
67-
| Account | `componentDidMount` |
66+
| Invoice | (2) `componentWillUnmount` |
67+
| Account | (3) `componentDidMount` |
6868

6969
### Fetching Data
7070

0 commit comments

Comments
 (0)