reevaluateComposition()v4.0.167
Re-runs calculateMetadata()
on the currently selected composition.
This is useful if the function relies on:
- The
public/
folder - Randomness
- Changing network resources
- Time
Example
Re-run calculateMetadata() on the currently selected compositiontsx
importReact , {useCallback } from "react";import {reevaluateComposition } from "@remotion/studio";export constReevaluateCompositionComp :React .FC = () => {constreevaluate =useCallback (async () => {reevaluateComposition ();console .log ("Re-evaluated!");}, []);return <button onClick ={reevaluate }>Re-evaluate</button >;};
Re-run calculateMetadata() on the currently selected compositiontsx
importReact , {useCallback } from "react";import {reevaluateComposition } from "@remotion/studio";export constReevaluateCompositionComp :React .FC = () => {constreevaluate =useCallback (async () => {reevaluateComposition ();console .log ("Re-evaluated!");}, []);return <button onClick ={reevaluate }>Re-evaluate</button >;};