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

Home page examples hooks and classes #2838

Closed
wants to merge 4 commits into from

Conversation

Zeko369
Copy link
Contributor

@Zeko369 Zeko369 commented Mar 15, 2020

Upgrade Flow version and add a tab switcher to switch between hooks and class examples on homepage

Closes: #2833

@facebook-github-bot
Copy link
Collaborator

Hi @Zeko369!

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 at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@reactjs-bot
Copy link

reactjs-bot commented Mar 15, 2020

Deploy preview for reactjs ready!

Built with commit 78605e9

https://deploy-preview-2838--reactjs.netlify.com

@facebook-github-bot
Copy link
Collaborator

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@Zeko369
Copy link
Contributor Author

Zeko369 commented Mar 15, 2020

The second example (setInterval) requires the use of useEffect, so I'd rather add a simple counter example (+, - buttons and a value) for the stateful example, add use this for "lifecycle" example.

Any ideas/comments?

@slk333
Copy link

slk333 commented Mar 15, 2020

a welcomed change that will probably require the approval of managers because it involves the frontpage of the website. Thank you for this pull request and i hope it will bring things forward!

@alexkrolick alexkrolick requested a review from gaearon March 16, 2020 20:42
@imedadel
Copy link

@gaearon Are you rewriting all the examples using hooks and functional components?

I'd like to help if that's the case :) The tutorial, with classes, is a bit intimidating

@krishnadevz
Copy link

i just updated hooks section for useState in functional component if anyone is maintainer here they can merge/review my pull request here 👉#2842

@Zeko369 Zeko369 mentioned this pull request Apr 2, 2020
@Zeko369 Zeko369 closed this Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reactjs.org homepage examples are outdated
6 participants