JavaScript frameworks are a powerful and useful modern tool for web development.
They offer tools that make web development, and in some cases app development,
more efficient and quicker. However, these frameworks come with some baggage.
Here are 5 things that make JavaScript frameworks a mini headache, especially for noobs:
Syntax & terminology are like their own language
JavaScript frameworks are built on top of HTML, CSS and JavaScript.
The developer can then write their apps and sites largely using JavaScript.
Pretty straight forward right? Not Quite. The one thing that isn’t talked
about much is the fact that the syntax and terminology of these frameworks
looks and feels far different from vanilla JavaScript. It’s like learning
a whole new programming language.
Look at the following code examples and tell me if these look like JavaScript:
{projects.map((project) => (
<Link to={project.slug}>{project.title}</Link>
))}
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body className={`${inter.className} antialiased`}>{children}</body>
</html>
);
}
{#each items as item, i (item.id)}
<li>{i + 1}: {item.name} x {item.qty}</li>
{/each}
While this is not necessarily a bad thing, it does however betray the so called ‘EASE’ of using or learning these frameworks. As a noob you make be roped in by the promise of a wonderful tool only to find yourself back in tutorial hell. After learning HTML, CSS and JavaScript you would’ve thought you were on your way to those tech billions only to find another stage of learning standing in your way. You probably haven’t even started on backend and databases yet. Don’t be discouraged though, it’s a small mountain to climb. Just be aware that things may look and feel a bit strange and confusing as you start out. The benefits of these frameworks are worth it though.
Framework Trap
Once you have decided on the framework you want to learn and use, the next thing you will notice is that it’s more of a long term commitment. Frameworks are sufficiently different enough that it’s very difficult to learn too many of them or to switch to another framework haphazardly. No matter how they are touted as being easy and fast to start using, each framework has a significant enough learning curve that requires one to be committed to it. So adopting a framework somewhat traps you to that platform. It’s also important to note that there’s probably very little value in learning multiple JavaScript frameworks. This is because they tackle similar problems and they all require a fair amount of time to master. Become a master of 1 or 2 rather than being average at many.
“Don’t worry about it” Mentality
Frameworks by nature have a sort of “Don’t worry about it. We’ll take care of it for you” type of mentality. They abstract away the complexities of handling Document Object Model (DOM) manipulation, managing application state, routing, and handling user interactions, to mention just a few. You will occasionally run into statements like build or ship faster or easier, “abstract away” or “we do this or that for you”. They aim to get you, the developer, to focus on building your ideas without concerning yourself too much about certain complex or time consuming tasks. So what is wrong with this? Nothing really, except that as a noob you need to push yourself to understand the tools you’re working with. Exploring a framework over time will help you discover even more amazing features and tricks. Sometimes all these abstracted things can make your apps or sites bloated. Understanding the framework a bit more may help you know where and when using that particular framework could be overkill.
Frameworks do change rapidly
As the saying goes, “speed kills”. JavaScript frameworks can come and go, or change, very rapidly. This can somewhat “kill” your project. You may find yourself needing to change or completely rewriting sections of your websites or even the whole site fairly frequently. For example, jquery was created in 2006, node in 2009, react in 2013 and nextjs in 2016. Between 2006 and now (2024) you could have found yourself having to learn all these frameworks and tools on top of keeping up with the latest versions of vanilla JavaScript. My personal experience a few years back (like 2019) involved learning reactjs for the first time then not really using it since then. Come 2024 and now react absolutely recommends you use react in conjunction with a framework like nextjs. Now I have to learn react and nextjs. So beware of the speed of change, otherwise you will be caught in what I will call “the noob cycle”.
How long does it take to call yourself a Dev?
You might come out of school with a degree or diploma in some tech field and find yourself still needing to learn these frameworks as well. This is because your curriculum generally will not cover them. Even if you’re self-taught, you will learn HTML, CSS and JavaScript, and then a framework or 2. This begs the question, “When do you get to call yourself a developer”? Or if you’re like me, “When do I get those tech jobs”? This can be one of those frustrating parts of your developer journey. When you look at job requirements for these tech jobs, it can feel like you don’t know enough to be hired. Then you find yourself having to learn new frameworks and languages AGAIN, and practicing some more. Sometimes you can find jobs requiring experience that is almost the life span of that framework lol. The only remedy is to keep pushing. The closer you are to mastery, the better your odds of getting jobs. PS, in any programming language or framework, if you can define variables, create and read from an array, or define a function with and without parameters, then feel free to call yourself a dev.
One on top of another
This one is definitely rather frustrating. You learn HTML, CSS and JavaScript, then you start learning the framework of choice, then the docs or tutorials tell you the framework uses or relies or is built on top of another framework or language, then you need to use another framework to use some feature of your chosen framework. E.g. After learning HTML, CSS and JavaScript, you learn react. React in turn absolutely recommends that you build your react website using a framework like nextjs or remix. Now you need to learn nextjs as well (facepalm). If you decide to build without the frameworks you now need to configure some things and use babel as well (facepalm again). As a noob it can be very discouraging to keep finding more things to learn just so that you can use this one framework. This is why it helps to learn and master 1 or 2 frameworks. It can become quite demanding.
In conclusion, frameworks are great and can save you a lot of trouble on your coding journey. They do however require a full commitment to them. Accessing the ease and convenience of a framework is a whole marriage, not a fling.