Uh oh!
There was an error while loading. Please reload this page.
remove variations in Button example code - #409
Conversation
ghost
commented
Aug 9, 2016
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 - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
| class Button extends Component { | ||
| render() { | ||
| // You can use them as regular CSS styles | ||
| return <div className="Button" />; |
There was a problem hiding this comment.
It’s not correct: in the new code, Button renders to Button which will cause infinite recursion.
What you probably want to change is to make the first example return <div className="Button" /> instead of vague // ....
gaearon
commented
Aug 22, 2016
Closing per comment—the change is incorrect. |
Small change that may help flatten some people's learning curve: button example code was different from the first instance to a subsequent instance. Similarly, the final example did not include the 'export' statement (which, as is pointed out earlier in the README, creates an issue that can be hard to troubleshoot). This small change proposes fixes to these two items to avoid possible confusion.