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

Put more focus on Hooks #2874

Closed
balazsorban44 opened this issue Mar 31, 2020 · 7 comments
Closed

Put more focus on Hooks #2874

balazsorban44 opened this issue Mar 31, 2020 · 7 comments

Comments

@balazsorban44
Copy link
Member

balazsorban44 commented Mar 31, 2020

Hi, I am the main author of the Hungarian 🇭🇺 translation pages, and it is now not the first time that I come across statements like this:

This might seem like a lot to take in at first. Don't rush it! If you're lost in the explanation, look at the code above again and try to read it from top to bottom. We promise that once you try to "forget" how state works in classes, and look at this code with fresh eyes, it will make sense.

On several pages, there seem to be suggestions to that if you would like to get started with Hooks, you should forget classes, although most of the Core Pages STILL heavily focus on classes, and seem to delay introducing Hooks to beginners for whatever reason. In many places, it is suggested somehow, that Hooks are a kind of an experimental API (can't remember where still linking to the RFC), and the community is still working out good practices, and implementing libraries. Hooks have been released for a time now, and speaking from experience, it REDUCES mental load by miles, compared to classes. Not to talk about the many great libraries solely built on Hooks. It may be the time to give more credits to Hooks, and phase out (meaning to give less focus to, not remove) classes from the docs, and put Hooks into the spotlight. 🎣

Correct me if I am wrong, I have heard several times from highly appreciated React developers, that Hooks are the future of React, as it is closer to what React is supposed to be.

@josephrexme
Copy link

josephrexme commented Apr 2, 2020

I agree with this. I think we can work on tabbed code blocks to look somewhat like I have designed here in Core Pages:

Screenshot 2020-04-01 20 45 43

This code is taken from this page https://reactjs.org/docs/forms.html#the-textarea-tag

@gaearon
Copy link
Member

gaearon commented Apr 2, 2020

We plan to rewrite a bunch of docs soon. I don't think we're going to introduce tabs though because the content would need to be different.

@josephrexme
Copy link

Great, thanks @gaearon ! Is there an issue you'd recommend to follow on the progress of docs rewrite? I will be interested in participating if needed, or just learning from the process.

@gaearon
Copy link
Member

gaearon commented Apr 2, 2020

No issue yet. We might create one when we’re closer to it but it’s unlikely it’ll need contributions early on because it would need to be written holistically end-to-end.

@Zeko369
Copy link
Contributor

Zeko369 commented Apr 2, 2020

@gaearon Maybe we could add something like this to the homepage? I have a PR open for that #2838

@gaearon
Copy link
Member

gaearon commented Apr 2, 2020

As I mentioned, we plan to completely overhaul the docs for Hooks. We appreciate the PR but this needs to be done holistically so I don't think disjointed individual changes make sense.

@balazsorban44
Copy link
Member Author

Thanks for the answer!

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

4 participants