Skip to content

🎥 Make videos programmatically with React

fix bug leading to `<Sequence>` infinite loop

Jonny Burger896b9f29d13f
diff --git a/packages/core/src/Sequence.tsx b/packages/core/src/Sequence.tsx
index bd7b9dd801..16ff3e36be 100644
--- a/packages/core/src/Sequence.tsx
+++ b/packages/core/src/Sequence.tsx
@@ -51,7 +51,7 @@ export const Sequence: React.FC<SequenceProps> = ({
...other
}) => {
const {layout = 'absolute-fill'} = other;
- const [id] = useState(() => String(() => Math.random()));
+ const [id] = useState(() => Math.random());
const parentSequence = useContext(SequenceContext);
const {rootId} = useContext(TimelineContext);
const cumulatedFrom = parentSequence