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
Docs - sample code updates needed? #2031
Comments
There are 2 things here:
|
thanks @alexkrolick! I'll look forward to any updates on the docs! |
@alexkrolick mentioned that you are leading the docs project, so will you please share your plans for updated documentation? I started learning React after the hooks API was implemented. I, too, found it confusing that many parts of the documentation explain topics only from the perspective of class components, but the hooks section encourages using function components for all new code:
|
Duplicate of #1788 |
There seems to be confusion on how to write class components in the docs. Using this as a starting point for other pages which may need to be updated.
There is a mixture of
function
declaration andclass
components in the docs which can be confusing as when someone may want or need to use either method. Since the release of hooks, the docs should have a new site version release (similar to how Babel has site versions) with the updated, preferred way to write components backed by the core team.in CONTRIBUTING.md, it shows that you should write classes with a constructor, but the Blog post titled "Update on Async Rendering" seems to prefer the former method of writing components.
Can this be solidified and added to the docs where necessary? Will there be a need to have a new site version with focus on
function
declaration components?🥇
The text was updated successfully, but these errors were encountered: