Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/guides/ComponentLifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ Consider this route config:

| Component | Lifecycle Hooks called |
|-----------|------------------------|
| App | `componentDidMount` |
| Home | `componentDidMount` |
| App | (2) `componentDidMount` |
| Home | (1) `componentDidMount` |
| Invoice | N/A |
| Account | N/A |

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

| Component | Lifecycle Hooks called |
|-----------|------------------------|
| App | `componentWillReceiveProps`, `componentDidUpdate` |
| Home | `componentWillUnmount` |
| Invoice | `componentDidMount` |
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
| Home | (2) `componentWillUnmount` |
| Invoice | (3) `componentDidMount` |
| Account | N/A |

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

| Component | Lifecycle Hooks called |
|-----------|------------------------|
| App | `componentWillReceiveProps`, `componentDidUpdate` |
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
| Home | N/A |
| Invoice | `componentWillReceiveProps`, `componentDidUpdate` |
| Invoice | (2) `componentWillReceiveProps`, (3) `componentDidUpdate` |
| Account | N/A |

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

| Component | Lifecycle Hooks called |
|-----------|------------------------|
| App | `componentWillReceiveProps`, `componentDidUpdate` |
| App | (1) `componentWillReceiveProps`, (4) `componentDidUpdate` |
| Home | N/A |
| Invoice | `componentWillUnmount` |
| Account | `componentDidMount` |
| Invoice | (2) `componentWillUnmount` |
| Account | (3) `componentDidMount` |

### Fetching Data

Expand Down