└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # react-roadmap 2 | 3 | If you’re new to React (or frontend in general) you may find the ecosystem confusing. There are a few reasons for this. 4 | 5 | * React has historically been targeted at early-adopters and experts 6 | * Facebook only open-sources what it actually uses, so it doesn’t focus on tooling for smaller-than-Facebook projects 7 | * There’s a lot of bad marketing masquerading as React guides 8 | 9 | Throughout this document, I’ll assume you’ve built a web page with HTML, CSS and JavaScript. 10 | 11 | ## Why should you listen to me? 12 | 13 | There’s a ton of conflicting advice about React out there; why listen to me? 14 | 15 | I was one of the original members of the Facebook team that built and open-sourced React. I’m no longer at Facebook and I’m now at a small startup, so I have a non-Facebook perspective as well. 16 | 17 | ## How to tackle the React ecosystem 18 | 19 | All software is built on a stack of technologies, and you need to understand enough of that stack to build your app. The reason why the React ecosystem of tooling seems overwhelming is because it’s always explained in the wrong order. 20 | 21 | You should learn, in this order, **without skipping ahead or learning concurrently**: 22 | 23 | * React itself 24 | * `npm` 25 | * JavaScript “bundlers” 26 | * ES6 27 | * Routing 28 | * Flux 29 | * Immutable.js 30 | * Relay, Falcor, etc 31 | 32 | Also: **you don't need to learn all of these to be productive with React.** Only move to the next step if you have a problem that needs to be solved. 33 | 34 | ## Learning React itself 35 | 36 | It’s a common misconception that you need to waste a lot of time setting up tooling to start to learn React. In the official documentation you’ll find a [copy-paste HTML template](https://facebook.github.io/react/docs/getting-started.html#quick-start-without-npm) that you can save in an `.html` file and get started right away. **No tooling is required for this step, and don’t start learning extra tooling until you’re comfortable with React basics.** 37 | 38 | I still think the easiest way to learn React is [the official tutorial](https://facebook.github.io/react/docs/tutorial.html). 39 | 40 | ## Learning `npm` 41 | 42 | `npm` is the Node.js package manager and is the most popular way front-end engineers and designers share JavaScript code. It includes a module system called `CommonJS` (Google it -- it’s important) and lets you install command-line tools written in JavaScript. 43 | 44 | Most reusable components, libraries and tools in the React ecosystem are available as `CommonJS` modules and are installed with `npm`. 45 | 46 | ## Learning JavaScript bundlers 47 | 48 | For a number of good technical reasons `CommonJS` modules (i.e. everything in `npm`) cannot be used natively in the browser. You need a JavaScript “bundler” to “bundle” these modules into `.js` files that you can include in your web page with a `