“Learn the basics before you learn React”, they say. But if you’re a beginner who’s learning with React first, you probably start to worry. You might start asking if you’re learning everything the wrong way.

The thing is, if you’re learning React before the basics, chances are that you’re doing it right. And that’s because it all boils down to your personal learning style.

Basically, devs can learn things in two ways: bottom-up and top-down. A bottom-up learner feels more comfortable learning the basics (i.e. JavaScript, HTML, or CSS) first. …

Handling asynchronous tasks in JavaScript has always been a colossal pain in the neck. Back in the day, developers had to deal with problems like callback hell and code that often became hard to read, scale, and maintain.

Nowadays, you have two very powerful tools that let us write asynchronous code: Promises and async/await. But, what's the difference, and when should you use one over the other?

First of all, it’s important to point out that it’s mostly a matter of opinion. Not everybody will agree with this, and that’s OK.

In general, I’d recommend that you use async/await as…

If you have a couple of years as a developer, you’ve probably used either Lodash or Underscore.js. These are two libraries that provide a bunch of utilities to manipulate data, particularly arrays and objects.

However, JavaScript now has many of the utilities these libraries offer. And now, the question is, are Lodash and Underscore still necessary? Or Am I adding unnecessary bloat into my project?

What You Already Can Do Without Lodash

This is a partial list of Lodash tasks that can now be replaced with vanilla JavaScript. If you use Lodash just for these utilities, you can replace it with Vanilla and remove the dependency.

Concatenate…

Handling asynchronous became way easier thanks to the async/await pattern. It makes async tasks almost as straightforward as regular synchronous operations:

async function asyncCheckPokemon() {
const response = await fetch("https://pokeapi.co/api/v2/pokemon/25");
const pikachuJSON = await response.json();
// Prints "Look mum, no callbacks! Pokémon #25 is pikachu"
console.log(
`Look mum, no callbacks! ` +
`Pokémon #${pikachuJSON.id} is ${pikachuJSON.name}`
);
}
asyncCheckPokemon();

However, there are still some gotchas you should take into account when you have to deal with this pattern. The function in the previous example doesn’t return anything, but it logs some text into the console.

Now, let’s make a small…

JavaScript is one of the most popular languages nowadays. However, it’s challenging to learn. Many people find it confusing, overwhelming. If you’re a beginner and want some help on how to tackle JavaScript, here are some useful tips for you:

Don’t Strive for Perfection: Programming is Making Mistakes

In 1999, the Mars Climate Orbiter was a spacecraft that NASA launched to explore Mars. However, the orbiter went off course and the mission failed. NASA lost $327 million in this mission.

The problem? A component, built by a third party, sent measurements in the imperial system (i.e. miles, yards, pounds, etc.), but the component that received them, built by…

JavaScript may be THE language of the Internet, but its ecosystem is overwhelming. There are just so many frameworks, libraries and stacks that you’re never going to learn all of them.

Since Microsoft released TypeScript in 2012, it took the JS world by storm. Now, over half of JS developers already use it. And this raises the question: “Should I learn it?”

The short (but hardly useful) answer is “It depends” because you have to think about your career stage and your objectives in order to get the right answer for you. But here are some guidelines and recommendations:

If…

f you spend time reading about JavaScript and keeping up with the latest stuff online, you’ll notice that many discussions revolve around classes. But if you don’t use them, you might feel like you’re “stuck in the old ways”. What are you missing out on if you don’t use classes?

Thankfully, it’s definitely possible to write correct, scalable code without classes. There are very few instances in which classes are necessary.

Also, classes in JavaScript have a subtle difference from other languages like Java. This small difference can be confusing and introduce bugs that are hard to find.

Nico Zerpa

Your JavaScript friend! I’ve been working for over a decade in JS, and I want to help you level up your skills

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store