Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove variations in Button example code #409

Closed
wants to merge 1 commit into from

Conversation

ownsourcing
Copy link

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.

@ghost
Copy link

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!

@@ -228,9 +228,11 @@ import './Button.css'; // Tell Webpack that Button.js uses these styles
class Button extends Component {
render() {
// You can use them as regular CSS styles
return <div className="Button" />;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

gaearon commented Aug 22, 2016

Closing per comment—the change is incorrect.
Happy to merge what I suggest in #409 (comment).

@gaearon gaearon closed this Aug 22, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants