Why Frontend Feels More Complex Than Ever
Frontend used to feel simple. Now it feels like every year adds a new abstraction. Another layer. Another tool. Another best practice.
The meme above is a representation of the complexity that is being added to the front-end development stack. It shows a comparison between HTMX and RSC. HTMX is a library that allows you to add dynamic behavior to your HTML using attributes. I don’t even like HTMX and probably won’t ever use it. But I get the appeal: it’s simple. Compared to modern React, it looks like a breath of fresh air.
My Journey
In 2021, like many frontend developers in the SPA era, I took my next step with React after completing HTML, CSS, and JS courses. Hooks were hot. useEffect for fetch calls, useCallback, useMemo, and React.memo to prevent rerenders. After a while, I realized the noise-to-signal ratio in the component’s code has increased significantly. For every 10 lines of actual component logic, I had to write an additional 10 lines for memoization to prevent React performance issues. Later, Redux for global state, TanStack Query for fetch calls, react-hook-form for forms, React DnD for drag and drop, etc…
Now RSC (React Server Components) are the new cool thing. Another abstraction to learn, master and discover the best practices. For beginners, it’s a lifesaver. No need to learn a backend. For experienced devs, though, it’s another abstraction to untangle when things go wrong.
When to use RSC?
- If you are a solo developer
- If you really want to prototype fast
- If your application is not that complex
- If your app is not client based
Pick tools you actually understand. Build something. Sometimes Next.js fullstack is the right call. Sometimes not. You won’t know unless you try and ship.