From 52a2da4182b9f1e61300a212e97f250a075c603b Mon Sep 17 00:00:00 2001 From: Joe Lencioni Date: Tue, 2 Aug 2016 09:09:12 -0700 Subject: [PATCH] Add curlies around ref function body The example we have here uses an implicit return, which is forbidden when assigning. This triggers the no-return-assign rule. Fixes #980 --- react/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react/README.md b/react/README.md index 716ef591..b216e14c 100644 --- a/react/README.md +++ b/react/README.md @@ -337,7 +337,7 @@ // good this.myRef = ref} + ref={ref => { this.myRef = ref; }} /> ```