Before we start learning, give me a few moments to demonstrate how natural and intuitive React really is.
Now that you've had a short teaser, let's hit the brakes and start from scratch. We'll pull in React, and build the obligatory "Hello World" component.
You'll likely need to pass data into your various components. We do so with "props." I'll show you.
Let's return to that simple idea of a counter, and reproduce it with basic jQuery. As we'll find, the process is deceptively simple. Sure, it's fewer lines, but if you're not careful, you'll end up with a massive
application.js file, full of countless DOM queries.
For our next demo project, let's create a simple app that allows a person to type in a GitHub username, and then see a link to that user's most recent Gist. This will give us the opportunity to review a few new important concepts.
Already, we have three script tags for our components. In a real-life application, this could easily become dozens of scripts. Clearly, that's not the way to go. Instead, we'll leverage both Browserify and Gulp.
Review the Gulp sourcefiles for this episode on GitHub.
Refs offer us a way to reference and access components in our applications.