Why React is important

In plain english: React might not last, there might be a better React tomorrow or next year but building user interfaces programmatically…

Share

Why React is important

In plain english: React might not last, there might be a better React tomorrow or next year but building user interfaces programmatically…

Ewakened @kentf

In plain english: React might not last, there might be a better React tomorrow or next year but building user interfaces programmatically with functions, that’s here to stay.

React is the new hotness, and truthfully I was hoping it would go away. I looked at the tutorial when it first came out and thought it was overly complex, didn’t fit with my view of the world (Rails) and felt like a company trying to lock me into a certain way of thinking.

I had had the same reaction to Angular when it burst on the scene too. While it felt a little more intuitive (Angular 1 of course), it too felt like Google trying to get me to be like Google. I was fine w/ Rails + jQuery.

I was wrong. React, is the future, or at least the underlying pattern that React implements is: functional programming of user interfaces.

What is functional programming? It’s a fancy way to say that if you have a certain set of inputs, and put them into a machine, you will always get the same outputs. If the inputs don’t change, the outputs won’t either.

f(x) = x + 3

If x = 7, then the answer is 10. It will always be 10 if x = 7.

Okay, now you understand functional programming, seriously it’s that simple. Let’s extend x + 3 into the world of user interfaces.

f(u) = header(x,y,z) + body(a,b,c) + footer(i,j,k)

Here is a function, f(u), that renders a user interface. The function is made up of other functions: header, body, and footer. Each of those functions take 3 parameters.

So what happens if your header and footer don’t change from request to request?

Remember above I said that a function x + 3 will always return 10 if x = 7 ? Why do you even need to compute the answer of 10, if you know that x = 7. If x doesn’t change, then you don’t need to run your function again.

At it’s core, this is how React works. It selectively calls functions that return outputs that represent user interface components. If the inputs don’t change, x + 3 = 10, therefore x = 7, then you don’t need to re-render that function. You know it will be 10, because the input is still 7.

I know this sounds brain dead simple for anyone who is using React in their day jobs, or has built something significant with it, but truthfully this is incredible. It is a better pattern than traditional Ajax. Not in a, “some people prefer this over that”, it’s just better.

And here is where many developers stop. That’s where I stopped. Yesterday, I grabbed coffee with one of my developer mentors, Anson. He’s building a new software workflow company and is using React on the front-end. He pushed me to think about the simple arguments above. I did, and a bit has flipped. Looking at the docs with my new simplified perspective, I “get it” even though I don’t “get” React.

Quick side note. Replace React here with Angular, Ember or whatever new front-end framework is really popular right now. I am picking React because Tilt uses it, Anson uses it and lots of other people do too. This article really isn’t about React, I just figured putting that in the title would get me an n+1 view, sorry. This is about the underlying functional pattern that React, and Angular implement. If you are worried about locking into Facebook’s view of the world, or Google’s or Tilde’s… who cares. If that’s your excuse it’s not a very good one. The libraries are popular because they are solving real problems, not because Zuck or Sergey told us to fork them.

Once you have digested the insanely simple argument above (the x = 7 and the answer is always 10 one), you should be able to see that traditional full page rendering + Ajax is dead. It’s gone, and it’s not coming back. Someone has built a better mousetrap. Knowing this, I can be honest with myself. What stopped me from jumping into React was fear. Not fear of not being good enough, or smart enough to learn it, but fear of the unknown.

I am really good at Rails + jQuery, and you probably are too. Or Django, or Node, or Java, or whatever code you are using to generate your views + jQuery. You are probably really good at caching, and expiring those caches and all that jazz… I am too. It’s not hard, well it’s kind of hard but you can figure it out.

I am not good at React, because the underlying pattern doesn’t feel natural to me. I am so used to making my apps a certain way. I love the bloated JS files I have. I love jQuery, I love weird ajax spaghetti code because it’s familiar and frankly, it’s easy. If someone describes an app to me, I can easily think through how to make it using Rails, jQuery, et al. I am trying to make a basic CRUD app right now in React it’s a f$&*king slog, but I have to do it.

Reacts is to functional programming of views as Rails was to MVC. It’s a great framework that implements a practical pattern. Fear not. Here we go.

Read more

Introducing Runner

Introducing Runner

It was December 28th. I woke up at 6am and Cursor had been running all night. I had Claude working while I slept, writing code, pushing commits, doing things that would have taken me a full day. Just sitting there staring at the screen, coffee getting cold, and realizing life wasn't going to be the same. I got a taste of the agentic workflow and couldn't go back. Turns out I wasn't the only one. When the Christmas break ended, Charlie and Yitong, my co-founders at Agora, had similar epiphanies

By Kent Fenwick
How I build: Dec 2025 Edition

How I build: Dec 2025 Edition

I treat AI as a tool and like any tool, people can use the same tools in different ways to acheive different results. I recently realized that I use AI differently than some of my colleagues so I was encouraged to share how I code. Before I talk about the tools and tactics, it's important to remember that I have a golden rule when using AI to code: Don't get AI to build something you don't understand or haven't built at least 3 times before. CRUD application? ✅ Simple Tab View Mobile App? ✅

By Kent Fenwick
The Messy Middle

The Messy Middle

My family is moving into a new house and we wanted to do a little bit of remodelling upstairs. Nothing big, just closing off a wall, making a closet a little bigger and swapping out a sink in the bathroom. My wife's family owns a construction business, so we are lucky to have an inside track with contractors and knowledge. My father in law is a genius, he runs his own construction business but still made time to come and measure, sketch and draw up the plans himself. My wife and I his customers

By Kent Fenwick
Someone needs to hear it

Someone needs to hear it

So, you want to write something but you are feeling like you can’t finish and post it for a really simple reason: there are 6 people in the world smarter than you on this topic, surely they should write it not you. During an interview today for Agora’s product manager, a warrior of art reminded me of this mental block and it rung so true. How many great pieces of advice, lessons, ideas and inspiration are left unsaid due to someone feeling as though they aren’t qualified enough to talk about it

By Kent Fenwick