diff --git a/docs/createMemo.md b/docs/createMemo.md index 9712f7c89e..2b3f8c5da6 100644 --- a/docs/createMemo.md +++ b/docs/createMemo.md @@ -10,8 +10,8 @@ which receives the same arguments and returns the same result as the original fu import {createMemo} from 'react-use'; const fibonacci = n => { - if (n === 0) return 1; - if (n === 1) return 2; + if (n === 0) return 0; + if (n === 1) return 1; return fibonacci(n - 1) + fibonacci(n - 2); };