2024 Front-End Trends: Full-Stack May Already Be Mandatory
Reading the 2023 JavaScript Star Trends, it seems you can see that the full-stack era has arrived. We should get ready and welcome it.

The 2023 JavaScript Star Trends came out back in January. I skimmed it at the time and didn't think much about it.
During the Spring Festival holiday it came back to me, and this time something felt different: maybe the full-stack era really has arrived.
## React vs. the Vue ecosystem
First, let's compare the star trends of the React and Vue ecosystems:

In the chart above, the star counts across the whole React ecosystem far outstrip Vue's — even the tenth place has more than Vue's first. Let's break them down by category:
| Rank | React | Vue |
|---|---|---|
| 1 | UI | Full-stack |
| 2 | Whiteboard | Presentation slides |
| 3 | Full-stack | Admin dashboard |
| 4 | State management | Hooks |
| 5 | Admin dashboard | UI |
| 6 | Docs | Docs |
| 7 | Full-stack framework integration | UI |
| 8 | Full-stack framework UI | Framework |
| 9 | Admin dashboard | UI |
| 10 | Serverless stack | State management |
You can see that React's ecosystem chain is basically mature: almost every category has a library on the list. It's no longer like Vue, where people are still slugging it out over UI frameworks.
On the full-stack side, Vue's top entry is the full-stack framework Nuxt.
React's Next.js isn't in the top spot, but server-side and full-stack entries account for four of the list, including the serverless stack at number 10. Also worth noting: React also has the notion of server components. Shadcn/ui can take first place because it's built on the headless UI library Radix, which works with server components too. So server-side and full-stack carry a big share of React.
Seen this way, the front end moving toward the server side has become an inevitable trend.
## htmx: a step backwards
Turning to frameworks, htmx ranks second in the star trends, gaining 15.6K stars in 2023 — quite close to React at number one.
And htmx has been the most discussed framework this year.
In the days before front-end/back-end separation that I worked through, we used JSP to generate front-end pages, and js was more of a tool for showing off on the page. Only after jQuery + Ajax became widely used did we get projects with a genuinely separated front end and back end.
People who don't know htmx might feel its arrival is a regression to the Java + jQuery + Ajax separated state. But after writing a few examples, I found it actually regresses to the stage where front end and back end aren't separated at all.
Whether you use Java, the world's best language PHP, or today's Node.js services, they can all plug into htmx. You just need to return HTML from the server side.
/** nodejs fastity 写的一个例子 **/
import fastify from 'fastify'
import fastifyHtml from 'fastify-html'
import formbody from '@fastify/formbody';
const app = fastify()
await app.register(fastifyHtml)
await app.register(formbody);
// 省略首页引入 htmx
// 首页的模板,提供一个按钮,点击后请求 html,然后将请求返回的内容渲染到 parent-div 中
app.get('/', async (req, reply) => {
const name = req.query.name || 'World'
return reply.html`
<h1>Hello ${name}</h1><button hx-post="/clicked"
hx-trigger="click"
hx-target="#parent-div"
hx-swap="outerHTML">
Click Me!
</button>
<div id="parent-div"></div>`, reply
})
// 请求返回 html
app.post('/clicked', (req, reply) => {
reply.html`<h1>Clicked!</h1>`;
})
await app.listen({ port: 3000 })
You may find that absurd, but clearly things have already started to change: the back end is coming to steal the front end's lunch too.
htmx already has plenty of followers on GitHub, and searching it turns up no shortage of front-end code; among the top three is a Django server-side framework based on Python.

Seeing the momentum, jQuery also shipped a 4.0 beta this year, with better support for modern browsers. All of this seems to be getting old architectures ready to return to the mainstream.
## The corporate angle
From a company's point of view, isn't it better if one person does both the front end and the back end?
It certainly is. Handling both ends single-handedly suits a company's interests better. Small companies abroad even prefer full-stack as their first choice.
Some may say national conditions are different, but in the front-end groups I'm in, for the past two years people have been talking about how their companies separate the front end and the back end.
Others still like the big-company playbook, with its emphasis on division of labor. But big companies actually have plenty of legacy projects, some of them even in PHP; and for new experimental projects, if you want to put in the least manpower and fail fast, a full-stack framework is naturally the best choice.
I'm not saying front-end/back-end separation isn't worthwhile. But we've entered the AI race now, and companies aren't willing to invest more in back-office system development. "Good enough to use" has become the current corporate goal, and naturally we should change along with it.
## Full-stack as the breakthrough
Then there's the claim that the front end is dead. I happen to think this is the best moment to make a change.
Now that browsers support new technology reliably, UI frameworks have converged, and UI component libraries have settled down, the front end no longer has to be helpless about browser incompatibility, no longer has to argue bitterly over a single pixel, and no longer has to tear its hair out over a product's baffling interactions.
That doesn't mean the front end is dead. More likely, one stage of our work is done, and more important work is being handed to us. Full-stack may be the way to break through.
With cloud services and cloud-native so widespread, language is no longer the main factor companies consider for development, and that has paved the way for Node.js full-stack too.
The front end has always picked up the hardest, dirtiest work: it took the slicing job from UI, then took on browser compatibility, and later took page rendering from the back end.
So why don't we go one step further and take the API development work as well?