What Even Is A React (And So Can You!)
This is a set of exercises for learning about React by reimplementing its core functionality from scratch. It takes the form of a series of automated tests that you must gradually enable. As you make each test pass, you’ll learn more about the React API and how it works under the hood.
To get started:
- Clone this repo and
npm test. You’ll see a lot of pending tests and (hopefully) no failures.
lib/fake-react-dom.jsin your editor. This is where your reimplementations of React and ReactDOM will live.
spec/react.spec.jsin your editor and follow the instructions in the comments there. As you enable each test, run
npm testagain to see it fail, then write the necessary code in
lib/fake-react-dom.jsto make it pass.
- If you get all the way to the end, open
demo.htmlin your browser to see a working React app that uses the implementation you’ve just built.