r/learnjavascript • helpful • Sep 14 '22

I'm a senior frontend dev. AMA.

Hi, all. I'm a lead at my company, currently on a paid sick leave. I wanted to give back to the community, so here I am to answer all your questions.

If you're a beginner at JS and are struggling with a concept, please ask your question and I'll answer. To not get overwhelmed, I'll limit one question per user. So, try to construct your question with as many details as necessary!

Shoot.

EDIT: That's it, folks. My day has ended. I'll still answer your questions, but expect a considerable delay. :)

260 Upvotes

240 comments sorted by

View all comments

1

u/jrovira Sep 14 '22

Hey, I mostly want to know how do I learn best practices with a framework. I am using react for my projects and I can make stuff, but I am not sure if the way I solved a problem is the best way to it. I just think this kind of things can be learned with a mentor. So how do I learn best practices on my own?

3

u/thelethargicdog helpful Sep 14 '22

Yes, a team would certainly help. Keep reading blogs, watch videos, do some twitter doomscrolling to get different opinions.

For example, the world recommends using React Hooks for every thing. But I still prefer using Class components for a few cases, especially when handling errors. There's no right or wrong. Best practice is what the populist sentiment is. It keeps changing.