We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 96ed82c + fe9acba commit 6ccafe0Copy full SHA for 6ccafe0
patterns/18.conditionals-in-jsx.md
@@ -66,7 +66,7 @@ Or alternatively simply use early returns
66
```javascript
67
const sampleComponent = () => {
68
const basicCondition = flag && flag2 && !flag3;
69
- if (!basicCondition) <p>Derp</p>;
+ if (!basicCondition) return <p>Derp</p>;
70
if (flag4) return <p>Blah</p>;
71
if (flag5) return <p>Meh</p>;
72
return <p>Herp</p>
0 commit comments