React useRef and Component Memory: Why Variables Reset on Re-render | Mahamudul Hasan Rubel