Skip to content

🎥 Make videos programmatically with React

add onError usage in ssr docs

Danil Hendra S814b0429c82d
diff --git a/packages/docs/docs/ssr.md b/packages/docs/docs/ssr.md
index 8759cb384b..79b833bef0 100644
--- a/packages/docs/docs/ssr.md
+++ b/packages/docs/docs/ssr.md
@@ -65,6 +65,11 @@ const start = async () => {
// Get's called after bundling is finished and the
// actual rendering starts.
onStart: () => console.log('Rendering frames...'),
+ // Handle errors in your React code
+ onError: (error) => {
+ console.error(`Could not render frame ${error.frame} properly`);
+ console.error(`${error.error.message}`);
+ },
onFrameUpdate: (f) => {
// Log a message whenever 10 frames have rendered.
if (f % 10 === 0) {