When do I use React and when do I use vanilla JavaScript?

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

I know this is an old video but, I personally never used a framework in my ~15 years of coding experience (except for jQuery), and probably never will?... It feels bloated with things that I never needed/required to build the things that I build. But again every use case is different. Back then I made the "mistake" learning jQuery instead of Vanilla JS first. It just confuses things later down the road. Even though you will manage it. But I can't advise anyone doing it. Learn at least the basic fundamentals of JS. I write JS almost daily since the past 10 years or so. It's also easy to debug your code with the "debugger" statement. Which makes it eady to improve/optimize your code.

ps. great little tip about the classnames vs dataset/attribute selector method. I do tend to use both on my selectors. Sometimes a mix of classnames and then specific attributes. For me it's not a big deal since I can read my own code like I would eat a cookie. But yeah, in a team, they probably would hate me if they had to read/understand the code that I write for myself 🤣

renstillmann
Автор

Good video. I’ve been studying full stack web development for about 6 months. I’m clearly no senior or anything like that but I’ve been thinking in-line with what you’re saying. It just makes sense that you pick the right tools for the job as opposed to what’s the hype right now. After learning vanilla fundamentals, learning React/continuing to learn React is such a please but at the same time I know I can’t just be using it on every project, some projects just need a little vanilla and that’s that.

Alekobeats
Автор

Thanks for these thoughts Fredrik. Reminds me of one of my bosses who used to ask along the lines of “If you work all the time then when do you think?”.

Could you please share the link to your long term project setup video, the one you’re referring to?

sergekol
Автор

This is so very very true, and needs to be repeated and repeated and repeated. The philosophy of choosing the tool based on the problem is so incredibly important. And it is completely overlooked in the development world, across all disciplines. Much too often we developers act like the carpenter who only ever got around to learn using the hammer.

Very good thoughts, thank you for sharing.

Ps: I realise this video is over one and a half years old, but the statement really is as important as ever.

akirkeby
Автор

Hello Fredrick, I keep on hearing from others how they all made the mistake by jumping into a framework and not learning enough of the fundamentals and how they really regret making that move. I don’t want to make the same mistake. How can you tell when you reached a point that your strong enough in your fundamentals in order to jump into a framework?

DevlogBill
Автор

You mentioned using react for page reload without refresh. Cant you use ajax for this? Or do you need to use one framework?

cano
Автор

Fredrik, i am not sure if you've mentioned it in your videos and i've simply missed it.

When you say vanila javascript what do you mean by that?

There are so many vanila ones out there - es5, es6, plain js, TypeScript - it's hard to distinguish what is what and when each should be used.

bmanq
welcome to shbcf.ru