In React (not really relevant to my question), I have the following:
const Curious = true;
useEffect(() => {
Curious && initSearch();
}, [Curious, initSearch]);
I'm getting "Expected an assignment or function call and instead saw an expression"
on Curious && initSearch();
But that line should be equivalent to writing the following, which doesn't give me the warning:
const Curious = true;
useEffect(() => {
if (Curious) { initSearch() };
}, [Curious, initSearch]);
What am I missing?