Skip to content

Commit 3baa47c

Browse files
ericpitchergaearon
authored andcommitted
Update conditional-rendering.md (#8636)
Stating the fact that component lifecycle methods will still fire as normal even though you return null from the render method.
1 parent 5d153c9 commit 3baa47c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/docs/conditional-rendering.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,5 @@ ReactDOM.render(
238238
```
239239

240240
[Try it on CodePen.](https://codepen.io/gaearon/pen/Xjoqwm?editors=0010)
241+
242+
Returning `null` from a component's `render` method does not affect the firing of the component's lifecycle methods. For instance, `componentWillUpdate` and `componentDidUpdate` will still be called.

0 commit comments

Comments
 (0)