A regular local variable is recreated on each render. A ref retains its current value between renders while allowing that value to change without scheduling another render.