re: Can I Use React Hooks Yet? VIEW POST

FULL DISCUSSION
 

Hooks, schmooks....there will be another best practice coming down the pike in mere months, I'm sure. Maybe this (just kidding, it's my own hack): github.com/dexygen/withMethods

 

I don't agree about another way that at least is supported by the core team, however; I do like your method registry idea. I think it is healthy to say: "How would I do this differently" as well as go even further and try to flesh out an example and share it with the community. I commend you for asking questions and presenting alternatives.

The reason I don't think anything else will come that will replace it is that something like useState and useEffect are abstractions over already existing things like setState and lifecycle hooks which in order to provide for us the team has to make these work under the hood and it took a lot off time. We can think back to React Fiber as the start of a lot of this work IMHO. Would love to hear more of your ideas though. I'm new to React, but I'm learning more and more each day!

code of conduct - report abuse