Hyvä Theme is Now Open Source: What This Means for Magento Community - Mageplaza
Hyvä is now Open Source and free. Discover what changed, what remains commercial, how it impacts the Magento ecosystem, and how to maximize its full potential.
Summer Nguyen | 05-06-2024
Javascript, the biggest workhorse behind the breath-taking and inspiring webpages keeps on evolving and moving up its speed every single day. The existence of the largest user base of 63.61% of developers, who are using it in their projects with 1st place in the ranking of the most used programming languages developers around the world in 2023 (Statista), makes it a ruler in the programming languages world.
These 2024 updates mean an optimistic projection of the future of JavaScript if you are a JavaScript fanatic or a web developer who wants to stay a step ahead of the competition. Therefore, apply the seatbelt and find out how these new features will amplify your JavaScript coding skills.

Every year, JavaScript comes with an upgrade to the official specification of ECMAScript, which defines the language. And would you believe it, the next release, ECMAScript® 2024 (ES15), is just full of goodies that are worth the hype!
These new language features aren’t just about fancy syntax. They address real-world developer pain points and bring powerful tools to our coding arsenals. By understanding and using them, you’ll write cleaner, more maintainable, and future-proof JavaScript.
It’s important to understand that features go through various stages before becoming fully baked into a release. Here’s a quick breakdown:
The ES15 release includes features promoted to Stage 4 and some exciting ones still in the pipeline that might just make their way into future releases.
So, what’s in store? Let’s explore a few of the major highlights that deserve your attention in the ES15 release. We’ll cover features focused on readability, new paradigms, and much more in the rest of this blog!
The ECMAScript 2024 update brings a suite of exciting new features to JavaScript. Let’s dive in and explore how these additions can enhance your coding experience.
In the world of programming, readable and efficient code is the holy grail. It makes your code easier to understand (for both you and your future collaborators!), less prone to errors, and can even boost performance. The 2024 JavaScript updates directly target these goals with some fantastic additions.
| Before | After |
|---|---|
|
|
The Pipe Operator (|): The pipe operator introduces a more intuitive way of chaining functions, making your code flow easier to read. Think of it as a visual representation of data being passed through a series of transformations. The pipe operator leads to less nested code and a clearer representation of the sequence of operations.
| Before | After |
|---|---|
|
|

Records and tuples introduce the concepts of true immutability to JavaScript. What does this mean?
Why immutability matters:
Pattern matching offers a powerful and expressive way to handle conditional logic. It allows you to compare your data against specific patterns and execute code accordingly. Think of it like an advanced ‘switch’ statement with superpowers! See this example for more:
const result = match (value) {
when { status: 'success', data: _ } => // Handle successful response
when { status: 'error', code: 404 } => // Handle 404 error
when _ => // Default case
}
Records and tuples encourage a data-centric approach focused on immutability. Pattern matching enables cleaner and more expressive ways to write conditional logic. These new paradigms open doors to writing JavaScript code in styles that were less practical before.
If you’ve ever had the misfortune of dealing with time and date maneuvering in JavaScript, you’ve seen many people in the same situation before! The old Date library is a constant headache to many developers as it has so many peculiarities and restrictions. The Temporal API is aimed at letting you live a more hassle-free and easy life.
Why the Temporal API?
Let’s see it in action, this is an example for getting the current date and time:
const now = Temporal.Now.plainDateTimeISO();
console.log(now.toString());
Adding/subtracting time:
const yesterday = now.subtract({ days: 1 });
const nextWeek = now.add({ weeks: 1 });
Timezone conversions:
const timezone = Temporal.TimeZone.from('America/Los_Angeles');
const laTime = now.withTimeZone(timezone);
The Temporal API comes as a one-stop solution to what has been bothering JS programmers since time immemorial – managing dates and times properly. Mastering the Temporal API means less time spent battling date quirks and more time focused on building amazing features.
Temporal API is a big leap that makes JavaScript language beyond the doubt for dealing with time-related data. Give yourself time to navigate through its functions and you will discover that it can be indeed a very helpful tool.
Decorators are an exciting experimental feature that could potentially change the way we write and organize JavaScript code. While not yet officially part of the ECMAScript 2024 release, they’ve got quite a buzz around them, so let’s take a closer look!
Think of decorators as functions that can enhance the functionality of other functions, classes, or even class properties. They use a special syntax, starting with the @ symbol, placed directly before the target they modify.
Why should you care?
Let’s imagine a @log decorator:
function log(target, name, descriptor) {
const originalMethod = descriptor.value;
descriptor.value = function(...args) {
console.log(`Calling method: ${name}`);
const result = originalMethod.apply(this, args);
console.log(`Result: ${result}`);
return result;
};
}
class MyClass {
@log
myMethod(arg) {
return arg * 2;
}
}
Decorators are still at an early stage, but they hold the potential to streamline common coding patterns. They encourage a more declarative style, where you focus on what to achieve, not the intricate details of how.

The JavaScript world is in a constant state of evolution, and the 2024 update brings even more goodies in the pipeline. Let’s take a quick glance at some other noteworthy additions and proposals that deserve to be on your radar:
These features showcase the ongoing efforts to make JavaScript even more expressive and developer-friendly. While some may still be in the experimental stage, they provide a glimpse into the potential future directions of the language.
The JavaScript 2024 update manifests a torrent of innovations that allude to the role of the language as the foundation of modern web development. From cleaner code with top-level await and the pipe operator to the paradigm shifts introduced by records and tuples, and the powerful Temporal API, JavaScript is becoming more expressive than ever. And with exciting features like decorators on the horizon, the future looks even brighter.
Stay curious, keep learning, and embrace these new tools to take your development skills to the next level!