https://github.com/tomstuart/react-workshop
What Even Is A React (And So Can You!)
https://github.com/tomstuart/react-workshop
Last synced: about 1 month ago
JSON representation
What Even Is A React (And So Can You!)
- Host: GitHub
- URL: https://github.com/tomstuart/react-workshop
- Owner: tomstuart
- Created: 2016-12-12T22:30:33.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2021-05-16T18:10:38.000Z (about 5 years ago)
- Last Synced: 2026-02-15T06:17:09.106Z (4 months ago)
- Language: JavaScript
- Size: 237 KB
- Stars: 6
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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 `cd` into it.
* Run `npm install`.
* Run `npm test`. You’ll see a lot of pending tests and (hopefully) no
failures.
* Open `lib/fake-react.js` and `lib/fake-react-dom.js` in your editor. This is
where your reimplementations of React and ReactDOM will live.
* Open `spec/react.spec.js` in your editor and follow the instructions in the
comments there. As you enable each test, run `npm test` again to see it fail,
then write the necessary code in `lib/fake-react.js` and
`lib/fake-react-dom.js` to make it pass.
* If you get all the way to the end, open `demo.html` in your browser to see a
working React app that uses the implementation you’ve just built.
There’s a [cheat sheet](cheat-sheet.pdf) with a summary of React, ReactDOM, DOM
and JavaScript APIs that might be helpful for completing the exercises.