diff --git a/content/docs/hooks-state.md b/content/docs/hooks-state.md index 0b4d15b65e7..be545d68dab 100644 --- a/content/docs/hooks-state.md +++ b/content/docs/hooks-state.md @@ -187,6 +187,13 @@ In a function, we already have `setCount` and `count` as variables so we don't n ``` +You can pass value as an argument to `setCount` or `function` with return statement: + +```js{1} + setCount(1); + setCount(previousValue => previousValue + 2); +``` + ## Recap {#recap} Let's now **recap what we learned line by line** and check our understanding.