title: "Expected an assignment or function call and instead saw an expression no-unused-expressions" "while using Optional Chaining"
body: <pre><code> useEffect(()=&gt;{
        scrollRef.current?.scrollIntoView({behavior:&quot;smooth&quot;})
    },[messages])
  </code></pre>
  <p>This use hook shows an error while compiling as &quot;Expected an assignment or function call and instead saw an expression  no-unused-expressions&quot;, the &quot;?&quot; used is -i think- is the cause which is called &quot;Optional chaining&quot; ..Right? im not sure.
  I couldnt understand what makes this statement doesnt work for me , please help me. every info you pass would be be really greatfull.
  is it beacuse i miss any npm module?..</p>