Web development is in much better shape than it ever was before. It’s both easier to build products and the products we build are much more user-friendly. We see an increasing emphasis on performance, consistency, and accessibility. Here are some advancements in web development that I expect to see in 2021.
Full-stack is going to be much more relevant
I expect the JAMstack hype to die out this year. I think it’s great that it exists and it’s very suitable for some use cases. (My blog is proudly powered by Gatsby!) But overall it was not a great idea to host your application exclusively on a CDN and a CMS.
JAMstack applications shine when everything is available at build-time. They can work with dynamic data by calling APIs during run-time, but this has a major drawback. All they can return is a 200 response, which hurts your SEO score and CDN behavior. In those cases, server-side rendering with proper HTTP response codes is a much better choice.
The project that sold me on this idea was Remix, which is a new framework built on old (and good) ideas. Built by people who worked on React Router, it embraces the web standards and encourages you to do the same. Unfortunately, it’s not open source (good for them though, they deserve to get paid for their exceptional work) so I won’t be able to try it out anytime soon.
We won’t need bundling hopefully
HTTP/2 is finally here (for about 5 years) which was supposed to make bundling redundant, so why are we still bundling? Turns out it’s not as simple as it looks, according to engineers at Khan Academy. But there are good ways to unbundle according to others.
On the other hand, the first-time load shouldn’t be our only concern, repeat loads should also be fast. (Wasn’t this kind of the point of service workers?) If you bundle, the tiniest changes made cause the bundle to be invalidated. But if you serve assets at the module level, then you can benefit from the browser cache.
Unfortunately during my tests, I found out that TypeScript doesn’t support loading modules from URLs. But I hope to see improvements about this in 2021. (One solution is to use Deno, which is awesome.)
CSS-in-JS is going to become even more interesting
Currently, my favorite CSS solution is Tailwind CSS. Not because it’s technically superior to others, but because it has great documentation and is batteries-included. But it has a major drawback, which is its file size.
This is a solved problem, of course, you’re supposed to purge the styles you don’t use. But this leads to the cache-invalidation-with-every-tiny-change drawback. I hope to see a new and exciting solution to this problem in 2021. I will continue using Tailwind until I find such a solution though.
In my mind, an ideal solution would be to use top-level CSS variables as design tokens and write (scoped) vanilla CSS for low-level components only. I’m planning to write more in this later.
More progressive enhancement, please
I like what Next.js and Gatsby do with the
I have reason to believe that Remix is actively working on this and hope Next.js will follow.
In conclusion, a central focus of my expectations boils down to simplicity and an adherence to standards. I think these concepts go hand in hand and web development will greatly benefit from them, both developers and end-users.