Skip to content

Commit cabff57

Browse files
committed
docs rev
1 parent 1dfc972 commit cabff57

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/rules/strict-logical-expressions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Forbids the usage of potentially falsey string or number values in logical && expressions.
44
Oftentimes, these logical expressions are used in jsx to enable conditional rendering behavior.
5-
However, one can encounter unexpected behavior when a 0 or empty string values is used as the left side of an expression and is returned as the result of the expression.
5+
6+
However, one can encounter unexpected behavior when a 0 or empty string values is returned as the result of the expression and rendered accidentally.
67

78
## Rule Details
89

@@ -58,6 +59,7 @@ defaultOptions: [
5859

5960
## Further Reading
6061

62+
- [React docs on conditional rendering](https://reactjs.org/docs/conditional-rendering.html#inline-if-with-logical--operator)
6163
- [Conditional rendering in React Native may crash your app](https://koprowski.it/2020/conditional-rendering-react-native-text-crash/)
6264
- https://github.com/facebook/react/blob/95a313ec0b957f71798a69d8e83408f40e76765b/packages/react-reconciler/src/ReactChildFiber.js#L461
6365
- https://github.com/yannickcr/eslint-plugin-react/issues/2073

0 commit comments

Comments
 (0)