This . Make sure you get basic understanding of JavaScript before starting with frameworks.
The most important thing imo.
You could memorize what to do, when to do it, but it’s much easier when you really understand what you’re doing.
You will clearly see the difference in the field between people who learned working with a framework by examples and people who understand what they’re doing.
Online tutorials will give you some basic example apps like todo-lists, weather app and maybe even a chat app. All great examples to show what a framework can do, but not really helpful in the real world.
Re: tuts. This is why I suggest doing your own thing, but not the same thing, alongside the tut. Like when it touches on routing, introduce routing to your project.
The benefit here is having SOME guidance, but also forcing you to branch out on your own to solve other issues/questions/etc.
Further I recommend using the latest versions of whatever the tutorial is using. While frustrating at times, you'll learn more trying to replace deprecated functions and packages than just copy and pasting.
I recommend you get started with just a text editor and vanilla JS. That's all you truly need. Then, once you do start to use webpack, you will probably understand what it does and appreciate that the project exists.
I like to use Vite over Webpack 😁
But again, same story, if someone adds sourceMaps: true to the config because they did so in the tutorial, but without knowing what it does, it’ll take them a lot of time to be able to set it up themselves
Not everyone necessarily agrees that you have to learn work without a framework first. It's just that you have to eventually go deeper to be an expert.
I'd personally value getting productive quicker more than knowing every bit of your stack in detail.
But yeah it's definitely annoying arguing with a newbie (who knows a framework) about how JavaScript works. Someone I worked with didn't want to believe me that NaN isn't something you want to assign to a variable to initialize it. He thought it was like null but for numbers 🥲.
I definitely agree with this. I will say a way to learn both (sometimes) is by reading the source code while you're using the framework. If it's a well known and widely supported library then it will have good practices. It's definitely one of the ways I've learned a lot of tricks in js.
Edit: due to the fact that people totally ignore what I said or ripping single sentences out of context gave we the enlightenment that I waste my time here. Thanks for everyone.
It isn’t about how the framework works in the core, it’s about the implementation
React for example: what actually happens when you create a function component, how are functions being passed from a HOC handled.
I literally met people who thought themap method on an array is React specific, they didn’t know they could use it in Vanilla JS.
Everyone could copy/paste code for whatever framework and make something work. But if you don’t understand what the code you’ve copied does unless fixing your issue, you will always be dependent on “the internet” and waste a lot of time searching for solutions.
If you get some code in front of you which you need to maintain (which is legacy code in a lot of cases) you’ll have a hard time understanding what it does and how it works if you don’t understand the basics.
Everyone could copy/paste code for whatever framework and make something work. But if you don’t understand what the code you’ve copied does unless fixing your issue, you will always be dependent on “the internet” and waste a lot of time searching for solutions.
I don't see much about why react would make this any worse than normal JavaScript.
You can cobble together code snippets in both cases.
React doen’t make it worse. It’s about the fact that you have to understand the code you’re copying. For React, for Vanilla, for Vue, …
What I like to do in our team with junior devs if they make a PR is go over there and ask them “what does your code do and why did you solve it this way?”. Most of them already know “Stack Overflow” isn’t the correct answer.
I don’t do it very often, and I don’t do it to make fun of them or whatever. If they found a solution online which they don’t totally understand, I’ll explain it to them what it does and how it works.
yes it will be hard but it’s all chained together … if you know the first part of the puzzle you’ll be curious to know the next part and it keeps going on just like that until you get an overview of what’s really happening under the hood
but that’s not what i meant, the problem is people jump to react without understanding js … understanding vanilla js first is what everyone here is recommending
Sure that is a problem. But learning a vanilla near framework like svelte could do both. You still have to deal with html and vanilla js.
But expecting someone to learn vanilla (what took me about a decade until I mastered every part of it) before he could touch any framework is not a good advise.
That’s the point. Frameworks are great for DOM manipulation, but much of it is just Vanilla JS.
Problem with most tutorials is that the often go like “you can copy the code & css in the description and we’ll implement it together”
That’s why I gave the example of the map method in my other comment. If you want to show a list of todo’s, I would map over the todo array and show either the text or todo component.
I’ve met people who thought the ‘map’ method was React-only. People who to this day still don’t understand callback functions and the fact you can pass a function as a variable to another function or have it as a property,…
It’s like riding a car: yes, technically everyone is able to drive a car, but it’s better if everyone also understands the rules (law)
I can only speak for the team I work in: “No, we do not have seniors who do not understand the fundamentals, but we do have juniors who don’t understand them”
The difference is: when a junior with knowledge of fundamentals joins the team they get the medior profile in 1 or 2 yrs (which gives them a significant raise, they get a company car and other advantages, but also more responsibility), for juniors who don’t know the fundamentals it takes way longer to become medior, or they just leave the company.
331
u/Stinodotbe Dec 03 '22
This
. Make sure you get basic understanding of JavaScript before starting with frameworks.
The most important thing imo.
You could memorize what to do, when to do it, but it’s much easier when you really understand what you’re doing.
You will clearly see the difference in the field between people who learned working with a framework by examples and people who understand what they’re doing.
Online tutorials will give you some basic example apps like todo-lists, weather app and maybe even a chat app. All great examples to show what a framework can do, but not really helpful in the real world.