I’m learning React

Some people who know me well may not quite have heard me correctly, so I’ll repeat:

I’m learning React.

Does this mean I’m turning my back on the principle of Progressive Enhancement? Does it mean I’m going to start building websites which are 99% JavaScript and 1% everything else? Have I given in?

No, dear reader, my opinions – shaped by luminaries like Jeremy Keith, Alex Russell, Tim Kadlec and many others – have not changed. The web is neck-deep in JavaScript and sinking deeper all the time, and organisations drinking the SPA framework kool-aid think that browsers are waving not drowning.

There are two reasons I’m learning this framework – and I’ll also be looking at Vue as well (I already have some commercial experience with Angular).

Firstly, when talking with teams and encouraging them to reduce their reliance on JavaScript for core functionality I’ve repeatedly received a “but you don’t understand it!” response. I do understand it, my 20+ years building websites hasn’t been spent hiding under a rock. JavaScript is cool, I get it,

This “but we’re building a web app, not a static site” is a common fallacy, and in a large part fuelling the current untenable position. I’ve not yet found anyone who can explain the difference between an “app” and a “site”, and most grudgingly accept there’s a big grey area between the extremes of a rarely-updated content site and, say, GMail. Most projects involve a mixture of slow and fast-moving information.

If I learn React then I can counter the lack-of-understanding argument. I can speak in the language of die-hard Reactians (is that the right word) and – hopefully – put across some reasons why core functionality should be delivered using the simplest technology possible (generally server-side generated HTML).

Secondly, I expect to fail to convince many people to use less JavaScript. So I want to have some practical examples of apps that use React (or any JavaScript framework) in a less all-or-nothing way.

After all, I don’t see any reason why this should be delivered to a browser:

<!doctype html>
<title>MY 'app'</title>
<script src="my-huge-bundle.js"></script>
<div id="app"></div>

If I learn React maybe I can implement some new patterns that will incorporate a Progressive Enhancement mindset.

I may fail at both those aims, of course. In which case I will still have learnt a new technology.

Week One (and a bit)

It’s hard to describe what’s happened in the UK in the last week (and a bit). Although many of us had kept half an eye on developments in China and around the world, the speed and scale of changes to life in this country came as a massive shock.

Seems like those ‘tin foil hat’ people might be right about a few things.

I think it may be useful, at least to me, to write a record of my thoughts and feelings at this unprecedented – a word that is currently being blared from every screen – time. In years to come this will be a memory, a historical event that people will study and ask each other ‘do you remember?’ I want to remember, and as my memory is lousy it’s better to write it down.

Except… I can’t. In some ways life is pretty normal, it’s just that I’m working from home all the time and the child is not at school. But there’s an eerie quiet everywhere due to much lower levels of traffic. Being put in a queue to access the Morrisons online shopping site is weird.

We’re tuning in pretty regularly to the nightly government press conferences, but I expect at this point in time there won’t be much happening as serious measures – a pretty strict lockdown – have already been put in place. We’ll just hear of COVID-19 cases climbing steadily higher. We’ve also found some good (and local) online faith resources. Mark Umpleby from Batley is doing night prayers at 9PM each night on Facebook which is very calming at the end of each fraught day. People are pulling together, it seems.

Not all people. My young friend Josh who is a security guard at a small supermarket told me he was assaulted yesterday trying to enforce a “only 5 people in the shop at once” policy. Still, it feels many people are being patient and kind – and the stories of individual acts of compassion and downright bravery (especially in the NHS) are humbling.

There is hope, although as I write it seems like a long way off.

RT @dylanbeattie: Going to a conference? Yes! Introduce yourself. Say hello. Chat to people. They’re lovely. Really! And if you’re already chatting in a group, make your group approachable using @ericholscher’s Pac-Man Rule. Here’s how it works. Have fun! https://t.co/QklklD43Me

RT @MaratFaz: I forgot my headphones at home but luckily can there is a transcript for this talk. So I don’t have to annoy people in the cafe. Made for people with disabilities, can be used by everyone. That’s why #a11ymatters P.S talk has been given by @WebDevLaw https://t.co/PBeSGHFSZW