React is an incredibly popular JavaScript framework with over 150,000 stars and used by more than 3.5 million other repositories on Github.
Sometimes the best way to understand something is to build your own version!
Some of these articles are quite old but as they mainly focus on the core concepts they are still valid today
1. Rodrigo Pombo - Build your own React
Didact
A DIY guide to build your own React
This repository goes together with a series of posts that explains how to build React from scratch step by step. You can jump straight to the last post which is self-contained and includes everything.
Blog Post | Code sample | Commits | Other languages |
---|---|---|---|
Introduction | |||
Rendering DOM elements | codepen | diff | 中文 |
Element creation and JSX | codepen | diff | 中文 |
Virtual DOM and reconciliation | codepen | diff diff diff | 中文 |
Components and State | codepen | diff | 中文 |
Fiber: Incremental reconciliation (self-contained post) | codepen | diff diff | 中文 |
The one with Hooks (self-contained post) | codesandbox | 中文 |
Follow @pomber on twitter for updates.
License
The MIT License (MIT)
2. Paul O Shannessy - Building React From Scratch
3. James Smith - Reverse Engineering React
4. Paul Marlow - Gooact: React in 160 lines of JavaScript
5. Oliver Russell - 33 line React
6. Ameer Jhan - Build your own React in 90 lines of JavaScript
7. Sven Roeterdink - Building your own React
8. Ofir Dagan - Build Your Own React
9. Andrew MacDonald - How I Built My Own “React” in Two Days — and Why I Did It
Sign up to our free weekly newsletter and stay in the loop with the latest and greatest web development projects on GitHub at www.iainfreestone.com
If you enjoyed this article you can follow me on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
Top comments (1)
Always a good idea to reimplement (in a minimalist way) a library to fully understand its concepts. This is why I built my own Redux & Redux-Saga 😉