From bc060f5edd61f2fe77619049dc6f90c052f78505 Mon Sep 17 00:00:00 2001 From: corinty Date: Mon, 9 Mar 2020 08:52:38 -0500 Subject: [PATCH] Moved a bracket in the setState function example (#2164) --- content/docs/reference-react-component.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/reference-react-component.md b/content/docs/reference-react-component.md index ecb4d087..bf0ab7c5 100644 --- a/content/docs/reference-react-component.md +++ b/content/docs/reference-react-component.md @@ -501,7 +501,7 @@ There are just two of them: `setState()` and `forceUpdate()`. ### `setState()` {#setstate} ```javascript -setState(updater[, callback]) +setState(updater, [callback]) ``` `setState()` enqueues changes to the component state and tells React that this component and its children need to be re-rendered with the updated state. This is the primary method you use to update the user interface in response to event handlers and server responses.