{"record":{"id":"4d320434bdca57dd","repo":"remotion-dev/remotion","slug":"the-freeze-component-requires-a-frame-prop","errorCode":null,"errorMessage":"The <Freeze /> component requires a 'frame' prop, but none was passed.","messagePattern":"The <Freeze /> component requires a 'frame' prop, but none was passed\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/core/src/freeze.tsx","lineNumber":29,"sourceCode":"\treadonly frame: number;\n\treadonly children: React.ReactNode;\n\treadonly active?: boolean | ((f: number) => boolean);\n};\n\n/*\n * @description Freezes its children at the specified frame when rendering videos.\n * @see [Documentation](https://remotion.dev/docs/freeze)\n */\nexport const Freeze: React.FC<FreezeProps> = ({\n\tframe: frameToFreeze,\n\tchildren,\n\tactive = true,\n}) => {\n\tconst frame = useCurrentFrame();\n\tconst videoConfig = useVideoConfig();\n\n\tif (typeof frameToFreeze === 'undefined') {\n\t\tthrow new Error(\n\t\t\t`The <Freeze /> component requires a 'frame' prop, but none was passed.`,\n\t\t);\n\t}\n\n\tif (typeof frameToFreeze !== 'number') {\n\t\tthrow new Error(\n\t\t\t`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`,\n\t\t);\n\t}\n\n\tif (Number.isNaN(frameToFreeze)) {\n\t\tthrow new Error(\n\t\t\t`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`,\n\t\t);\n\t}\n\n\tif (!Number.isFinite(frameToFreeze)) {\n\t\tthrow new Error(","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/core/src/freeze.tsx#L11-L47","documentation":"Thrown by the <Freeze /> component when the `frame` prop is undefined. Freeze needs a concrete frame number to pin its children at; without it the component cannot operate.","triggerScenarios":"Rendering <Freeze>{children}</Freeze> without passing a `frame` prop, or passing frame={undefined} conditionally (e.g. frame={someMaybeUndefined}).","commonSituations":"Forgetting the frame prop; computing frame from a value that can be undefined; conditional rendering where frame is only sometimes passed.","solutions":["Always pass a numeric frame prop: <Freeze frame={30}>.","If frame is computed, supply a fallback: frame={computedFrame ?? 0}.","Render <Freeze /> only when the frame value is known, otherwise render children directly."],"exampleFix":"// before\n<Freeze>{scene}</Freeze>\n\n// after\n<Freeze frame={30}>{scene}</Freeze>","handlingStrategy":"type-guard","validationCode":"if (typeof frameToFreeze !== 'number') {\n  // render children directly or pick a default frame\n  return <>{children}</>;\n}\nreturn <Freeze frame={frameToFreeze}>{children}</Freeze>;","typeGuard":"const isFrame = (v: unknown): v is number => typeof v === 'number' && Number.isFinite(v);","tryCatchPattern":null,"preventionTips":["Always pass an explicit numeric `frame` prop.","Provide a fallback (frame={computed ?? 0}) for computed values.","Render <Freeze /> only when the frame is known."],"tags":["react","component","freeze","props","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}