1 | /// <reference types="react" />
|
2 | /**
|
3 | * Creates a `Ref` whose value is updated in an effect, ensuring the most recent
|
4 | * value is the one rendered with. Generally only required for Concurrent mode usage
|
5 | * where previous work in `render()` may be discarded before being used.
|
6 | *
|
7 | * This is safe to access in an event handler.
|
8 | *
|
9 | * @param value The `Ref` value
|
10 | */
|
11 | declare function useCommittedRef<TValue>(value: TValue): React.MutableRefObject<TValue>;
|
12 | export default useCommittedRef;
|