A long time ago, when I took Data Structure and Algorithms, one of the assignments was to write my own implementation of an array list, a linked list, a queue and a stack (using Modula-2). Since that day, I’ve never had the need of implementing a linked list again, there’s always a library that keeps me from reinventing the wheel.

Was the assignment worthwhile? Of course. I learned a lot by doing it myself. I learned how to properly use each data structure and how to choose between them.

The purpose of this series of posts (and the companion repository) is to do the same but with something that we now use more than linked lists: React.

I wonder the same for React

Luckily, if we don’t care about performance, debuggability, portability, et cetera, the main three or four features of React aren’t very difficult to re-write. In fact, they are pretty simple and can be written in less than 200 lines of code.

We are going to do that. Write a working version of React, in less than 200 lines of code, with the same API. Given the didactic nature of this library we’ll call it Didact.