perf: Remove useComponentSize from image and video node render

This commit is contained in:
Tom Moor
2024-06-01 11:13:03 -04:00
parent 009458e435
commit f2e9c0ab23
6 changed files with 87 additions and 46 deletions

View File

@@ -1,6 +1,8 @@
import { useState, useEffect } from "react";
export default function useComponentSize(ref: React.RefObject<HTMLElement>): {
export default function useComponentSize(
ref: React.RefObject<HTMLElement | null>
): {
width: number;
height: number;
} {