Simply copy and paste the following command line in your terminal to create your first Strapi project.
npx create-strapi-app
my-project
One common debate or discussion amongst front-end developers is “Which framework is the best?” Now, that’s a question that doesn’t have a direct answer. The best frontend framework depends on various factors, like the project requirement, the type of application being built, the community and ecosystem, the learning curve, and so on.
In a previous article, we looked at 5 important considerations when choosing a frontend framework. Feel free to visit it to get more in-depth insights on how you can choose a framework for your project.
First, let’s look at the foundation of these JavaScript frontend frameworks.
HTML might be the backbone of the web, but let’s face it: JavaScript is the backbone of modern web development. It enables dynamic and interactive experiences.
JavaScript allows developers to build highly interactive web pages. Frameworks and libraries like React, Angular, and Vue.js built with JavaScript have changed how developers create scalable and maintainable codebases.
Now that we’ve gotten familiar with JavaScript, let’s look at the frontend frameworks that are built with JavaScript.
In this article, we’ll focus on reviewing various popular frontend frameworks used by developers to build web-based projects. But first, what do frontend frameworks do? Why are they so important enough to raise arguments from developers?
Frontend frameworks are tools that simplify the process of building dynamic and responsive web applications. They offer pre-built structures and components to help developers focus on delivering effective user experiences.
We’re going to explore some of the top frontend frameworks:
We will cover their common key features, recent trending updates, community support, pros and cons, and the ecosystem as a whole.
Frontend frameworks are built mainly either in JavaScript or Typescript or on top of another framework, just like how Nuxt.js was built on top of Vue.js.
Irrespective of the different use cases, types of applications built with each framework, or personal preferences of developers, there are certain features that are common across these frameworks.
Let’s get into it!
One of the most common features in frontend frameworks is the component-based architecture. The frameworks we’ll be reviewing here all have different ways components can be created.
Creating components involves breaking down the UI into modular, reusable components to streamline development, improve code quality, and foster collaboration within a team.
Take a look at the framework’s component-based systems. They are created in similar ways but have different file extensions.
jsx
or .tsx
for Next.js, React, Remix, and Solid.js .vue
for Vue and Nuxt.js, which is built on top of Vue.js.svelte
for Svelte.ts
for TypeScript in Angular, and .astro
for Astro-based applications.Despite the different file extensions and ways of creating the component templates, they all have the same functionality—to separate code for reusability and maintainability.
Many frameworks support both SSR and CSR, allowing developers to choose the best approach based on their project’s needs and use cases.
While CSR provides a more dynamic user experience by reducing server load, it is less effective in terms of initial load times and SEO. On the other hand, SSR can lead to faster initial load times and deliver better SEO.
Soon, we will look at how each of the frontend frameworks handles CSR and SSR.
State management is very important in front-end development. It is the process of storing accessible data across the application for easy use among the different components.
Frameworks often come with built-in or recommended state management solutions like:
All these help maintain the application’s data flow.
Every framework has tools, libraries, and IDE extensions that are specific to them.
Apart from the recommended state management libraries for each framework, we have other libraries for different purposes, like:
We also have some VS code extensions that were built specifically for certain frameworks, like the:
These libraries and extensions enhance development and play a significant role in the framework’s adoption and versatility.
use client
directive.- CSR in Angular: Angular is primarily a CSR framework. It runs JavaScript on the client-side after the initial HTML is loaded, dynamically updating the DOM.
csr = false
option.nuxt.config.ts
.clientOnly
to wrap components to make them render only in the client. You can do this for components that interact directly with the DOM..server
and .client
modules. To optimize browser loading, the client build splits your app into multiple bundles and removes server code from those bundles.Learn more about SSR and CSR.
Frameworks strive to push features that incorporate changes to their frameworks. Some of these features pushed to production are built to improve the framework’s scope and functionalities. Some of the features are requested by a large number of users and community members.
Let’s take a look at some of the current trending features for each framework:
Next.js is a framework built on top of React. It has become a go-to framework for building full-stack web applications.
Some recent updates that were added to Next.js include:
1
2
3
4
5
6
7
8
9
10
11
12
13
export const submitForm = async (data: FormData) => {
‘use server’;
const name = data.get('name') as string;
const email = data.get('email') as string;
console.log('Form submitted:', { name, email });
return {
success: true,
message: ‘Form submitted successfully!’,
};
};
ppr
option in your next.config.mjs
file, like this:1
2
3
4
5
6
7
8
9
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
ppr: ‘incremental’,
},
};
export default nextConfig;
Turbopack Build Tool: This is a bundler optimized for JavaScript and TypeScript, built into Next.js for faster development build. It can be used in both the pages
and app
directories by enabling the --turbo
flag in your ‘package.json’ file.
Code Sample:
1
"dev": "next dev --turbo",
Next/Image Optimization: The Next/Image feature was added as an upgrade to the framework with the version 13 release. This feature offers image optimization for faster load times. The image component requires the following properties: src, width, and height.
Code Sample:
1
2
3
4
5
6
7
8
9
import Image from 'next/image';
export default function Home() {
return (
<div>
<Image src="/image.png" alt="car" width={500} height={500} />
</div>
);
}
Next up we have React, which is one of the top popular frontend frameworks. Well, it’s actually a UI library, but it’s often miscategorized as a framework. It’s the most popular UI frontend library, according to this survey trend by StackOverflow.
Some improvements were made to version 18, and earlier this year, version 19 was announced at the React Conf 2024 and released. Now what were these improvements and updates?
Key recent features include:
The transition feature allows you to prioritize urgent updates (like typing in input or clicking) over non-urgent ones (like updating a list or navigation).
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { useTransition } from 'react';
function App() {
let [isPending, startTransition] = useTransition();
function handleClick() {
startTransition(() => {
// Fetch request or so...
});
}
return (
<button onClick={handleClick}>
{isPending ? "Loading...": "Click me"}
</button>
);
}
Automatic Batching: We got to see the modified and improved method of batching in React 18 called Automatic Batching. This feature automatically groups multiple state updates within an event handler or asynchronous operations into a single re-render instead of triggering a separate re-render for each update.
Code Sample:
1
2
3
4
const handleClick = () => {
setCount(count + 1);
setText('Updated');
};
Server Components: We were still getting used to the improved features in version 18 when React version 19 was released, and it featured some new additions. In React 19, server components will be integrated directly into React.
React components are client-side by default. Adding the use server
directive at the top of the component makes it a server component. Just like how adding use client
in a Next.js component makes it a client component.
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
'use server';
import fetchData from '../lib/fetchData';
export default async function ServerComponent() {
const data = await fetchData();
return (
<div>
<h1>Server component sample</h1>
<p>{data.message}</p>
</div>
);
}
Other recent updates in React version 19 include the React compiler feature, Actions, Assets Loading, Document Metadata, and some new React Hooks. Here is the document containing the full list of features recently released in React 19.
Vue.js 3 is a JavaScript framework for building user interfaces.
Composition API: The Composition API in Vue.js is a feature introduced in Vue 3 and added in Vue 2.7. It offers a more flexible and reusable way to organize code within components.
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<template>
<div>
<h1>Vue composition API example</h1>
<p>Count: {{ count }}</p>
<button @click="increment">Increment</button>
</div>
</template>
<script>
import { ref } from 'vue';
export default {
setup() {
const count = ref(0);
const increment = () => {
count.value++;
};
return {
count,
increment
};
}
};
</script>
Svelte compiles your components into efficient JavaScript code that directly updates the DOM instead of using a virtual DOM. This makes apps faster and more lightweight.
Recent updates include:
Code Sample:
1
2
3
4
5
export async function load() {
return {
message: "Hello from the server!"
};
}
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
<script>
let count = $state(0);
function increment() {
count += 1;
}
</script>
<button on:click={increment}>
clicks: {count}
</button>
Read more about what’s new in Svelte.
Remix is a full-stack JavaScript framework built on top of React-router to enhance user experience for fast and dynamic applications.
Recent trending features in Remix include:
Code Sample:
1
2
3
4
5
6
7
8
9
import {
vitePlugin as Remix,
cloudflareDevProxyVitePlugin as remixCloudflareDevProxy,
} from "@remix-run/dev";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [remixCloudflareDevProxy(), remix()],
});
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
// vite.config.ts
import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
export default defineConfig({
plugins: [
remix({
ssr: false,
}),
],
});
Code Sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function NavImage({ src, alt, id }) {
const to = `/images/${idx}`;
const vt = unstable_useViewTransitionState(href);
return (
<Link to={to} unstable_viewTransition>
<img
src={src}
alt={alt}
style={{
viewTransitionName: vt ? "image-expand":" ",
}}
/>
</Link>
);
}
Angular is a Javascript UI framework best known for or used for building dynamic single-page applications (SPAs). It was written in Typescript.
Recent updates/features in Angular include:
Code Sample:
1
2
3
4
import { signal } from '@angular/core';
const count = signal(0);
count.set(count() + 1);
Code Sample:
1
<img ngSrc="image.png" alt="code sample" width="400" height="300" priority />
Non-destructive Hydration: This feature was introduced in version 16 and changes the way Angular apps render content on the server-side. It eliminates the visible UI ‘flicker’ that would occur when hydrating a server-side rendered Angular application by destroying the existing DOM and then rebuilding and reusing it on the client-side.
Partial Hydration: Here, the page’s JavaScript won’t be loaded when the page is rendered
Angular’s New Built-in Control Flow Angular added @if and @for directives for better template control flow to let display, repeat, or hide elements conditionally.
Code Sample:
1
2
3
@if (a > b) {
<p>{{a}} is greater than {{b}}</p>
}
defer
block within that component template.Code Sample
1
2
3
4
5
@defer {
<large-component />
} @placeholder (minimum 500ms) {
<p>Placeholder content</p>
}
Solid.js focuses on fine-grained reactivity. Frameworks like React use a virtual DOM, while Solid.js works directly with the real DOM, making Solid.js applications efficient.
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { createSignal } from 'solid-js';
function Counter() {
const [count, setCount] = createSignal(0);
return (
<div>
<button onClick={() => setCount(count() + 1)}>
Click
</button>
<p>{count()} </p>
</div>
);
}
SolidStart: SolidStart is a full-stack framework built on top of Solid.js and uses Vinxi, providing routing, SSR, CSR, SSG, and server-side data loading.
Solid Meta: Solid Meta helps manage document metadata such as titles, meta tags, and other head elements in a Solid.js application.
Code Sample:
1
2
3
4
5
6
7
8
9
10
11
import { MetaProvider, Title, Link, Meta } from "@solidjs/meta";
const App = () => (
<MetaProvider>
<div class="Home">
<Title>Title of page</Title>
<Link rel="canonical" href="http://solidjs.com/" />
<Meta name="example" content="sample content" />
</div>
</MetaProvider>
);
Astro is a new framework that is designed mainly for building content-heavy websites. It uses Island architecture to reduce JavaScript payloads and improve performance.
Code Sample:
1
2
3
4
5
6
7
8
9
---
import MyComponent from './MyComponent.jsx';
---
<html>
<body>
<MyComponent client:load />
</body>
</html>
<ViewTransitions />
routing component.Code Sample:
1
2
3
4
5
6
7
8
9
10
11
12
---
import { ViewTransitions } from ‘astro:transitions’;
---
<html lang="en">
<head>
<title>My Homepage</title>
<ViewTransitions />
</head>
<body>
<h1>Welcome to Astro!</h1>
</body>
</html>
You can enable prefetching with the prefetch config:
1
2
3
4
5
import { defineConfig } from 'astro/config';
export default defineConfig({
prefetch: true
});
<Image />
component using astro:assets
. Code Sample:
1
2
3
4
5
---
import { Image } from ‘astro:assets’;
import image1 from '../../images/subfolder/image1.png';
---
<Image src={image1} alt= "A dog eating a pizza"/>
You can learn more about Astro in the Getting Started With Astro With Ben Holmes tutorial.
Built on top of Vue.js, NuxtJS enhances SSR capabilities and other features that let you build full-stack applications.
Code Sample:
1
2
3
4
5
6
7
8
9
10
import { defineStore } from 'pinia'
export const useStore = defineStore('main', {
state: () => ({ counter: 0 }),
actions: {
increment() {
this.counter++;
}
}
});
Code Sample:
1
2
3
4
5
export default defineNuxtConfig({
modules: [
'@nuxt/fonts',
]
})
Nuxt DevTools: A new feature introduced as a floating panel alongside your Nuxt app to give you insights into your Nuxt App. It also supports community modules, like Vue Test or Tailwind CSS.
Nuxt/scripts-and-assets: provides you with utilities for optimally loading third-party resources.
Nuxt/bridge: Lets you easily migrate or move your Nuxt project from Nuxt 2 to Nuxt 3 and implement some of Nuxt 3’s features.
For more information about new features within the JavaScript framework ecosystem, watch this YouTube video.
These are the companies and communities backing and contributing to the success of these frameworks.
Community: Vue is an independent, community-driven project created by Evan You in 2014. It isn’t backed up by big companies the way React, Angular, and some others are. Rather, it’s backed by donations from sponsors and contributions from its open-source community.
Vue currently has 208k stars on GitHub, making it the second highest-starred frontend framework.
Companies: Used by Alibaba, Xiaomi, GitLab, Wikimedia Foundation, NASA, Apple, Google, Microsoft, Zoom, and many more.
Community: Astro is relatively new but has gained traction among developers focusing on static sites and performance.
Astro is sponsored by Netlify, Storyblok, Sentry, Google, Ship Shape, and individuals and organizations. It has an active growing community that contributes to the framework.
Astro has a number of 45.5k stars on GitHub.
Companies: Used by Nordvpn, Firebase (blog), Appwrite, Thinkmill, etc.
Here we’re going to compare the frameworks based on some factors including features, performance, communtiy size & ecosystem, and learning curve.
Framework | Features | Performance | Community Size and Ecosystem |
---|---|---|---|
React | Hooks, JSX, Virtual DOM, One-way data binding | Good performance with optimizations | Large community and ecosystem |
Vue.js | Composition API, reactivity system, Directives | Fast, lightweight | Growing community and ecosystem |
Angular | TypeScript support, Two-way data binding, Dependency injection, Angular CLI | Strong performance for large applications | Strong enterprise backing and active community |
Svelte | No VDOM, simple syntax, Reactive components | Very fast at updating changes, compiles to JavaScript | Smaller but rapidly growing community |
Remix | Nested routes, Built-in support for FormData handling, Data-fetching APIs | Highly optimized for SSR, Fast load times and caching strategies | Growing community |
Solid | Fine-grained reactivity, JSX | High performance | Smaller growing community |
Astro | Island architecture, SSG support, multi-framework support | Optimized for performance, SSR | Small but increasing community |
Next.js | SSR, SSG, Automatic code splitting, Image optimization, Internationalization (i18n) Support | Excellent performance with SSR, SSG, and image optimization | Large ecosystem, large and active community |
Nuxt.js | SSR, SSG, Composition API, Vue-based, Automatic code splitting | High performance with SSR, component optimization | Growing community, Vue ecosystem support |
Pros | Cons |
---|---|
Easy to learn and implement | Requires additional libraries for state management and routing. |
Component-based architecture | Not great for SEO optimization |
Huge community and ecosystem | It isn’t a full framework as it handles only the ‘View’ part of the MVC architecture |
React Native for mobile app development using React codebase | Frequent change to features often time-disrupting development pace |
Pros | Cons |
---|---|
Great for large-scale applications | Steep learning curve |
Component-based architecture | Can be very heavy for smaller projects |
Large community and ecosystem | It is quite complex |
Good for building dynamic single-page apps | Lots of boilerplate code that may not all be useful and therefore hard to maintain |
Built on the MVC architectural pattern | Renders content on the client side; hence, it is not so great for SEO. |
Pros | Cons |
---|---|
It is lightweight, so it’s easy and fast to install. | Smaller community compared to React and Angular |
Easy to use and beginner-friendly | Limited ecosystems of plugins, libraries, and tools |
Flexible | Risk of over-flexibility |
Uses a virtual DOM to render a view | - |
Pros | Cons |
---|---|
Focuses on server-side rendering to ensure better performance | Smaller community and ecosystem |
Built-in support for nested routing for structuring complex apps | Limited resources and ecosystem |
Comes with built-in data loading and mutation handling | - |
Pros | Cons |
---|---|
Simple syntax. Easy to learn | Smaller community |
No virtual DOM leading to improved performance | Limited resources and ecosystem |
Less boilerplate to write, hence easier maintenance. | Fewer job opportunities, for now, at least. |
Pros | Cons |
---|---|
Better performance for faster load time | Frequent updates causing frequent migration to the latest versions |
Image optimization | Hard learning curve for server components |
SSR and SSG, which is great for SEO | Unnecessarily large for small projects |
Built-in router for page navigation and functionality for API handling | Limited to React’s features since it’s built on top of React |
Built-in middleware support for custom server-side logic | - |
Pros | Cons |
---|---|
Small bundle size leading to faster initial load time | Smaller community |
Fine-grained reactivity for targeted and specific updates | Limited resources and features that have to be provided by 3rd parties |
High performance | - |
Pros | Cons |
---|---|
Great for static sites with its SSG capabilities | Small ecosystem |
SSR, which is great for SEO | Limited use cases out of static site generation |
Content-first approach, which is good for content management | - |
Pros | Cons |
---|---|
SSR allowing for pre-rendering of pages on the server side | Small community |
Modules ecosystem to extend the functionality of apps | Complex compared to Vue applications |
SSg for generating static HTML files | High traffic causing server strain |
Automatic code splitting | - |
According to the most recent StackOverflow developer survey conducted in May 2024, it shows that the top 5 most used frontend frameworks are Reactjs, followed by Next.js, Angular, Vue.js, and Svelte.
Nuxt.js, Astro, Remix, and Solid.js came in the last four places among the frameworks we reviewed in this article.
That’s not to say the high-ranking ones are necessarily the best performing or better of them all. The best framework for your project depends on the use case, project requirement, performance needed, and so on, as discussed previously at the beginning of this article.
JavaScript extends beyond traditional web applications to AI interfaces, reshaping how we develop and interact with the web.
The rise of AI models like Google’s Gemini is transforming how we write frontend code. We also have AI-powered features, such as automated code suggestions (GitHub Copilot and ChatGPT) and code completion (Tabnine), that streamline development workflows and improve user experiences.
One other exciting example of AI transforming frontend development is Vercel’s v0, a generative AI tool that generates copy-and-paste friendly React code that developers can use in their projects.
JavaScript is not just powering the web now but it’s also shaping the way we build and interact with digital interfaces through AI innovations.
In this review, we explored the latest features, pros, and cons of JavaScript and the popular frontend frameworks, as well as how AI is transforming front-end development. Each frontend framework offers some unique advantages and caters to different project needs.
Your project requirements, the team’s expertise, and the framework’s ecosystem all play a role in choosing the right framework for your project.
Stay up to date with the latest trends through documentation, release notes, and community forums in order to make informed decisions on frontend frameworks to utilize.
Juliet is a developer and technical writer whose work aims to break down complex technical concepts and empower developers of all levels.