title: I define column index parameter in my arrow function but i can use in my useEffect causes is not define
body: <p>I define column index parameter in my arrow function but I can use in my <code>useEffect</code> causes is not define! What can I do?</p>
  <pre><code> useEffect(() =&gt; {
      const resizeObserver = new ResizeObserver(() =&gt; {
        if (elementRef.current) {
          setBoxViewWidth(elementRef.current.clientWidth);
          if (elementRef.current.clientWidth &lt; 1200) {
            elementRef.current.clientWidth.style.right = (boxViewWidth / 2) * (columnIndex % 2);
          } else if (elementRef.current.clientWidth &lt; 992) {
            elementRef.current.clientWidth.style.right = (boxViewWidth / 1) * (columnIndex % 1);
          }
        }
      });
      if (elementRef.current) {
        resizeObserver.observe(elementRef.current);
      }
      return () =&gt; {
        resizeObserver.disconnect();
      };
    }, [boxViewWidth]);
  
   const RenderBox = ({ style, rowIndex, columnIndex }) =&gt; {
      console.log(style);
      return (
        rows &amp;&amp; (
          &lt;div
            style={{
              ...style,
              right: (boxViewWidth / 3) * (columnIndex % 3),
            }}
          &gt;
          ......
  </code></pre>