Finding Fine-Grained Reactive Programming

Getting a grip on the front-end epidemic of 2019, being rapidly adopted by React, Vue, and Svelte

Ryan Carniato
Level Up Coding
Published in
15 min readJul 1, 2019

--

Desert Dune Focus from Pexels.com

Something has been happening in the front-end world this past year that has left a lot of developers confused. Just when ES6 Classes had become ubiquitous, popular libraries are abandoning them at a rapid rate. Just when things were starting to feel like they were settling down this curveball seemed to come out of nowhere.

What I’m talking about are these functional Components with things called Hooks, and Computeds. I’m talking about this recent Vue RFC. Things like observable data and explicit dependency declarations. The slew of on_____ and use_____ that are sure to cover your screens for years to come.

The truth is, this isn’t out of nowhere. Although why this suddenly exploded now is a mystery to me as much as the next person. We are talking about a programming paradigm that was gaining steam on the front-end before React showed up on the scene but then lay mostly dormant for the past 5 years. However, I’m one of those poor souls that continued to use this swearing up and down it was the superior pattern to develop front-end UI both for developer experience and performance. So who better to introduce you to your new overlords?

Why?

You cry as you throw your laptop off the table. We get pretty invested in our technology choices on the front-end. We ride our chariots and wave our banners. “Virtual DOM for life” or “HOCs ‘R US”. But with anything, where there is progression, there often is little regression too. Old becomes new again.

To put it simply, the reason this suddenly became a topic of interest is that after years of trying to solve issues with Components by creating yet more Components, something clicked somewhere that there are other compose-able patterns that could be applied. That Classes and Mixins never cleanly solved the problem and sometimes Components are just too much — their weight too heavy for their granularity. I suspect that several problems the React team was having kept coming back to these issues. But once React came forward, the same tribe that condemned the pattern in the first place, it was like the veil was lifted. And everyone was…

--

--

FrontEnd JS Performance Enthusiast and Long Time Super Fan of Fine Grained Reactive Programming. Member of Marko Core Team. Author of SolidJS UI Library.