Write Your Own React.js!

There are a lot of “React”s

The core principle of React is actually very simple and surprisingly beautiful. Most conference talks about React mention this principle, so you may have already heard it.

“Immutable App Architecture” by Lee Byron at Render 2016
“Is Fiber Ready Yet?” on 23 November 2016

There are a lot of “React”s…and you should write another

There are a lot of people who love and use React, but obviously the implementation details on top of the core abstraction have not yet settled since we have so many alternatives.

  1. React is bad—kinda
  2. It is easy and fun to write your own React
  3. React enlightenment

1. React is bad—kinda

I’ll admit, that headline is a little sensationalist. I don’t actually believe that React is bad, and I don’t know anyone who would argue that as a whole React is bad. However, there are some tradeoffs that React makes which may be bad for your specific use case.

The Preact homepage

2. It is fun and easy to write your own React

You are interviewing for a job where the team uses React, and they want to know if you are a React expert—they want to know if you are the real deal. Imagine, your answer to the question “Do you know React?” could be: “Yeah, I rewrote React in my spare time.” That’s some major street cred’, but the best part is it isn’t actually to get to the point where that can truthfully be your response (just don’t tell the interviewer that).

Part of a VDOM implementation that looks like a Redux reducer

3. React enlightenment

The third benefit of going through the fun and easy process of writing your own React is enlightenment, or some other fundamental realization which makes you a better programmer.

--

--

Product engineer at Airtable. Previously Facebook. @calebmer on Twitter

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Caleb Meredith

Caleb Meredith

Product engineer at Airtable. Previously Facebook. @calebmer on Twitter