import {useLayoutEffect, useRef} from 'react'; import {AbsoluteFill} from 'remotion'; const Component: React.FC = () => { const ref = useRef(null); useLayoutEffect(() => { if (!ref.current) return; const ctx = ref.current.getContext('2d'); if (!ctx) return; ctx.fillStyle = 'blue'; ctx.fillRect(0, 0, 100, 100); }, []); return (
); }; export const opacityNested = { component: Component, id: 'opacity-nested', width: 200, height: 200, fps: 25, durationInFrames: 1, } as const;