You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/overview.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -352,14 +352,15 @@ Important Note About Dynamic Segments
352
352
If you have dynamic segments in your URL, a transition from `/users/123`
353
353
to `/users/456` does not call `getInitialState`, `componentWillMount`, `componentWillUnmount` or `componentDidMount`. If you are using those lifecycle hooks to fetch
354
354
data and set state, you will also need to implement
355
-
`componentWillReceiveProps` on your handler, and its child components, just like any other
355
+
`componentWillReceiveProps` on your handler and its stateful children, just like any other
356
356
component whose props are changing. This way you can leverage the
357
357
performance of the React DOM diff algorithm. Look at the `Contact`
358
358
handler [in the `master-detail` example](https://github.com/rackt/react-router/blob/master/examples/master-detail/app.js).
359
359
360
-
If you would rather mount components normally when transitioning between dynamic segments, you can assign a unique key to your route handler component to bypass this optimization:
360
+
If you would rather force route handlers to re-mount when transitioning between dynamic segments, you can assign a unique key to your route handler component to bypass this optimization:
0 commit comments