Skip to main content

restartStudio()v4.0.162

MyComp.tsx
tsx
import { restartStudio } from"@remotion/studio";
import { useCallback } from"react";
constMyComp:React.FC= () => {
constonClick=useCallback(async () => {
try {
awaitrestartStudio();
console.log("Studio will restart now");
} catch (err) {
console.error(err);
}
}, []);
return (
<buttontype="button"onClick={onClick}>
Hello World
</button>
);
};

Requirements

In order to use this function:

1
You need to be inside the Remotion Studio.

2
The Studio must be running (no static deployment)

Otherwise, the function will throw.

See also

AltStyle によって変換されたページ (->オリジナル) /