React hooks, Svelte, KnockoutJs, Angular1 in 2021
opinions on some beloved front-end frameworks and looking into 2021
React Hooks
If you are a React developer, still on class-based methodologies, adopt this in 2021, and adopt it fast. Integrate it with your class-based projects, and let the new and old live side-by-side. No hassle, no specialised integration/migration tools needed. Keep your new hook app, and class based app in the same codebase and update your react code-base to the newer concepts with minimal migration headaches, if any. Learn the pure bliss of function-based code; write more concise code, code faster, and handle state updates at a more granular level compared to class-based code.
This is a master-class of how to introduce a new technology/concept, without the need (necessarily) to break/deprecate/dessert an older, more stable working technology. The way the react team implemented hooks is impressive because of these 2 main reasons: enables codebase updates/migrations without sacrificing to the tech gods, and enables technicians who like stability (older techies 😬) to mentally shift to the newer concepts without feeling a weight of peer pressure to completely abandon the old n’ stable for the new n’ shiny. Listen to this podcast on this topic
I wrote an article of lamentations on react some time ago, but seems the library is headed in the right direction 👍🏽
In 2021, I’ll continue learning more of react’s concepts like concurrency mode and suspense
Svelte
React introduced the concepts of components architecture to the masses, and was received with much applause and popularity. Svelte forwarded the compiler based concepts more quietly and disrupted the way front-end frameworks and libraries are built. While Virtual DOMs are going nowhere anytime soon, the power of the compiler based approach simply cannot be ignored (read this article on language servers, and the svelte blog).
Svelte code is terser compared to React-hooks code — as per my experience — and simply integrates with any javascript library out there, unlike React which needs a library to be wrapped before integration (I stand to be corrected). I can sing many praises on svelte on many concepts it has pushed, but let me not gush too much.Check it out for yourself here.
What I really like about svelte, much like Apple’s M1 chips, is that sometimes looking at a challenge from a slightly different angle — redesigning current solutions — can really give better solutions.
In 2021, I will aim to increase usage in svelte, applying it to projects with a bigger scope. Also will be checking Typescript on Svelte
Knockout JS
This was my micro front-end framework of choice when I implemented a quick nano project — scoreboard for phase 10 — to learn tailwind css. I declare my unbending affections to this O.G. lib of MVVM. For me it struck the right balance between being simple enough to pick-up, and having just enough features to enable front-end reactivity without adding unnecessary complexity. I got introduced to declarative programming during the age of Jquery, and for me, the eureka moment cannot be understated.
This lib was soo good, azure dashboard, at the time, was implemented using knockout; follow this link. So yeah, salut.
In 2021, I will be looking at alternatives in the micro world — alpine or surplus js
Angular 1
This was the macro front-end framework of choice during it’s heyday. Angular popularised backend concepts and brought these to the fore-front (pun intended) — concepts like Inversion of Control/Dependency Injection and MVC.
Angular 1 was easy to learn compared with the alternatives at the time. It included the concept of extending html, much like knockout, rather than using html templating enabling a more declarative programming approach. It made building SPAs easier at the time compared to existing alternatives. Many developers adopted it, especially backend developers who found similar backend concepts in the front-end. It was awesome. Still is-ish.
2021... check out the options above 🏃🏽♂️
Happy Coding as we begin a new decade