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

Update tutorial doc for ES6 #3647

Closed
catherinettt opened this issue Apr 11, 2015 · 5 comments
Closed

Update tutorial doc for ES6 #3647

catherinettt opened this issue Apr 11, 2015 · 5 comments

Comments

@catherinettt
Copy link

Are there plans to update https://facebook.github.io/react/docs/tutorial.html to ES6?

We are reworking internal documentation based on these tutorials to use ES6. We'd be happy to contribute back if you want us to update the code examples in the existing tutorial.

Would it be best to keep the existing React.createClass examples and add the ES6 underneath or create a new ES6 tutorial page (eg. react/docs/tutorial-es6.html)?

@jimfb
Copy link
Contributor

jimfb commented Apr 11, 2015

I think ES6 is the "new" way of doing things, so probably just update the existing examples. Feel free to submit a pull request. cc @sebmarkbage @zpao

@sophiebits
Copy link
Collaborator

No, we're not ready to recommend ES6 classes to all newcomers. See #3375 for more details.

@sebmarkbage
Copy link
Collaborator

@spicyj is right but we should clarify the blockers before we do want to switch. IMO they are:

  1. Property initializers reaches a stable polyfill that we can recommend.
  2. The observe() pattern is released and is the primary recommendation for Flux stores (no mixins).
  3. We publish an article describing alternatives to mixins.
  4. Most popular libraries you might want to use, moves away from mixins.

@catherinettt
Copy link
Author

I agree that ES6 is not ready for newcomers and it will be more than just updating the tutorial examples.
Let's stick with your plan. Thanks guys!

@zpao
Copy link
Member

zpao commented Apr 14, 2015

Going to close this out as it's likely we'll forget to ever update this even after we update docs. We won't forget to come back to actually making the change when we're ready though.

@zpao zpao closed this as completed Apr 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants