Skip to content

🎥 Make videos programmatically with React

fix docs

Jonny Burgerfff1626b1d60
diff --git a/packages/docs/docs/dynamic-import.md b/packages/docs/docs/dynamic-import.md
index b3103859a5..27e8557939 100644
--- a/packages/docs/docs/dynamic-import.md
+++ b/packages/docs/docs/dynamic-import.md
@@ -62,7 +62,7 @@ import { getInputProps, Img } from "remotion";
const DynamicAsset: React.FC = () => {
const inputProps = getInputProps(); // {"imageSrc": "./assets/img0.png"}
- return <Img src={require(inputProps.imageSrc)} />;
+ return <Img src={require(inputProps.imageSrc as string)} />;
};
```
@@ -75,7 +75,7 @@ import { getInputProps, Img } from "remotion";
const DynamicAsset: React.FC = () => {
const inputProps = getInputProps(); // {"imageSrc": "img0.png"}
// Works!
- return <Img src={require("./assets/" + inputProps.imageSrc)} />;
+ return <Img src={require(("./assets/" + inputProps.imageSrc) as string)} />;
};
```