diff --git a/docs/react-integration.md b/docs/react-integration.md index 129e8e1f9..66ca290c6 100644 --- a/docs/react-integration.md +++ b/docs/react-integration.md @@ -421,7 +421,7 @@ However, the set of props that a React component receives is in itself not obser import { observer, useLocalObservable } from "mobx-react-lite" import { useEffect } from "react" -const TimerView = observer(({ offset }) => { +const TimerView = observer(({ offset = 0 }) => { const timer = useLocalObservable(() => ({ offset, // The initial offset value secondsPassed: 0,