/**
* Copyright (c) 2025 Huawei Technologies Co., Ltd.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {MutableRefObject, useRef} from 'react';
export function Ref<T>({
render,
}: {
render: (ref: MutableRefObject<T | null>) => any;
}) {
const ref = useRef<T | null>(null);
return render(ref);
}