• useRefs is a custom React hook that provides a way to manage multiple refs in a single object. It returns an object with methods to get, set, delete, and clear refs.

    Type Parameters

    • TRefs extends object

      The type of the refs object.

    Parameters

    • initialRefs: TRefs = ...

      The initial refs object.

    Returns IRefs<TRefs>

    An object with the following properties:

    • get: A method to get the value at key from the refs object. If key is not provided, returns the entire refs object.
    • set: A method to set the value at key in the refs object.
    • del: A method to delete the value at key from the refs object.
    • clear: A method to clear the refs object.
    • proxy: A method to create a proxy for the refs object. The proxy allows you to directly access and modify the refs object.