Skip to content

Commit 9253200

Browse files
committed
Clarify conditional rendering
1 parent b336b03 commit 9253200

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

04.conditional-rendering.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/**
2-
* You can’t use regular if/else conditions inside a component definition. The conditional (ternary) operator is your friend.
2+
* You can use regular if/else conditions inside a component render. The conditional (ternary) operator is your friend.
3+
* Although, as the markup gets larger or more varied - it is advisable to split it up into separate components and use them instead.
34
*/
45

56
//if

0 commit comments

Comments
 (0)