Skip to content

🎥 Make videos programmatically with React

Update SubtitleArtifact.tsx

Jonny Burger8b0550b1d3d8
diff --git a/packages/example/src/SubtitleArtifact/SubtitleArtifact.tsx b/packages/example/src/SubtitleArtifact/SubtitleArtifact.tsx
index 56e892fdcf..fa36b1dc18 100644
--- a/packages/example/src/SubtitleArtifact/SubtitleArtifact.tsx
+++ b/packages/example/src/SubtitleArtifact/SubtitleArtifact.tsx
@@ -1,6 +1,10 @@
import React from 'react';
-import {Experimental} from 'remotion';
+import {Experimental, useCurrentFrame} from 'remotion';
export const SubtitleArtifact: React.FC = () => {
- return <Experimental.Artifact content="Hello World!" filename="hello.txt" />;
+ const frame = useCurrentFrame();
+
+ return frame === 0 ? (
+ <Experimental.Artifact content="Hello World!" filename="hello.txt" />
+ ) : null;
};