From 1303a3d38c223de6905eba7ebc9e7b1ff8e946ec Mon Sep 17 00:00:00 2001 From: Thomas Levy Date: Wed, 15 Nov 2017 16:05:33 -0800 Subject: [PATCH] Fix setState example code Seems to have been a mix of the two examples the section was covering. --- 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 ea4664ac..be8fbc29 100644 --- a/content/docs/reference-react-component.md +++ b/content/docs/reference-react-component.md @@ -347,7 +347,7 @@ Subsequent calls will override values from previous calls in the same cycle, so ```js this.setState((prevState) => { - return {counter: prevState.quantity + 1}; + return {quantity: prevState.quantity + 1}; }); ```