Creates a ref that updates when the given value updates. Useful for state variables that are used in asynchronous callbacks (where the state value may become stale).
The value for which to create a ref.
Creates a ref that updates when the given value updates. Useful for state variables that are used in asynchronous callbacks (where the state value may become stale).