update state hook docs with function argument - #2341
Conversation
|
Deploy preview for reactjs ready! Built with commit a0ffbcd |
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
|
We're trying to keep this intro part really simple. I'm not opposed to mentioning it later on this page and linking to /docs/hooks-reference.html#functional-updates, though I don't see a good place to do so. I don't think it needs its own code sample here. |
|
makes sense, I haven't noticed the functional updates part in hooks API reference - people tend to look for the whole info about useState in it's own page I believe. I will take a look if there is any spot to put reference there. Thanks for the review Sophie! |
Update of state hook documentation with function as a possible argument to set function.