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

Updating Examples To Function Components & Hooks #2944

Open
ishandeveloper opened this issue May 1, 2020 · 1 comment
Open

Updating Examples To Function Components & Hooks #2944

ishandeveloper opened this issue May 1, 2020 · 1 comment

Comments

@ishandeveloper
Copy link

@ishandeveloper ishandeveloper commented May 1, 2020

Hi, I am new to react and was just going through the documentation. When, I discovered that most of the examples in the react documentation are outdated, they still use class instead of a function component.

Few Examples Of This :
https://reactjs.org/docs/forms.html
https://reactjs.org/docs/lifting-state-up.html

Also, I believe showing the integration of hooks in these examples, will be of much great help to beginners.

@an4ger
Copy link

@an4ger an4ger commented May 1, 2020

Hi @ishandeveloper.
Docs are not outdated. Class components still actively used and some features can't be implemented with hooks.
I recommend you to check this part of docs:
https://reactjs.org/docs/hooks-faq.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.