use_ref
Preserve a mutable value for the lifetime of the component without causing re-renders.
Parameters:
- initial_value (RefValueT | Callable[[], RefValueT] | None, default:
None) - Optional value or callable returning the value assigned toref.current.
Returns:
- MutableRef[RefValueT] - A
MutableRefwhose.currentproperty can be read and written freely.