Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/crutchcorn/codewrapper. A modular, framework-agnostic library for building interactive code editors codewrapper.vercel.app
Something went wrong. Try again.
12345678910import { ForwardedRef } from "react";
export function assignRef<T>(ref: ForwardedRef<T>, value: T) { if (typeof ref === "function") { ref(value); } else if (ref) { ref.current = value; }}