;
+ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
61 │ };
62 │
- i This happens when you use ternary operators in JSX with alternate values that could be variables.
-
- i Replace with a safe alternate value like an empty string , null or another JSX element.
-
-
-```
-
-```
-invalid.jsx:64:29 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
- i Potential leaked value that might cause unintended rendering.
-
- 63 │ const MyComponent5 = () => {
- > 64 │ return ;
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 65 │ };
- 66 │
-
- i This happens when you use ternary operators in JSX with alternate values that could be variables.
-
- i Replace with a safe alternate value like an empty string , null or another JSX element.
-
-
-```
-
-```
-invalid.jsx:64:29 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
- i Potential leaked value that might cause unintended rendering.
-
- 63 │ const MyComponent5 = () => {
- > 64 │ return ;
- │ ^^^^^^^^^^^^^^^^^^^^^^^
- 65 │ };
- 66 │
-
- i JavaScript's && operator returns the left value when it's falsy (e.g., 0, NaN, ''). React will render that value, causing unexpected UI output.
-
- i Make sure the condition is explicitly boolean.Use !!value, value > 0, or a ternary expression.
-
-
-```
-
-```
-invalid.jsx:69:24 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
- i Potential leaked value that might cause unintended rendering.
-
- 67 │ const isOpen1 = 0;
- 68 │ const Component7 = () => {
- > 69 │ return 0} />;
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 70 │ };
- 71 │
-
- i JavaScript's && operator returns the left value when it's falsy (e.g., 0, NaN, ''). React will render that value, causing unexpected UI output.
-
- i Make sure the condition is explicitly boolean.Use !!value, value > 0, or a ternary expression.
-
-
-```
-
-```
-invalid.jsx:73:15 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
- i Potential leaked value that might cause unintended rendering.
-
- 72 │ const Component8 = ({ count, title }) => {
- > 73 │ return
{(((((count))))) && ((title))}
;
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 74 │ };
- 75 │
-
- i JavaScript's && operator returns the left value when it's falsy (e.g., 0, NaN, ''). React will render that value, causing unexpected UI output.
-
- i Make sure the condition is explicitly boolean.Use !!value, value > 0, or a ternary expression.
-
-
-```
-
-```
-invalid.jsx:77:16 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
-
- i Potential leaked value that might cause unintended rendering.
-
- 76 │ const Component9 = ({ data }) => {
- > 77 │ return
{(((((data)))) && (((((data.value))))))}
;
- │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 78 │ };
- 79 │
-
i JavaScript's && operator returns the left value when it's falsy (e.g., 0, NaN, ''). React will render that value, causing unexpected UI output.
i Make sure the condition is explicitly boolean.Use !!value, value > 0, or a ternary expression.
@@ -427,15 +322,15 @@ invalid.jsx:77:16 lint/nursery/noLeakedRender ━━━━━━━━━━━
```
```
-invalid.jsx:81:15 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
+invalid.jsx:68:15 lint/nursery/noLeakedRender ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
i Potential leaked value that might cause unintended rendering.
- 80 │ const Component = ({ value }) => {
- > 81 │ return