Using the in-browser React and Babel libraries!

Hi everyone!
If you are starting with learning React, the best way to get started is to use the in-browser React and Babel libraries. That’s what the Learning React book starts off with as well. Since the printed book may go out-of-sync with the recommended version and path to the libraries, this post will act as an anchor to always reference people to for the latest/recommended starting point.

With that said, here it is:

<!DOCTYPE html>
<html>
 
<head>
  <meta charset="utf-8">
  <title>React! React! React!</title>
  <script src="https://unpkg.com/react@16/umd/react.development.js"></script>
  <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  <script src="https://unpkg.com/[email protected]/babel.min.js"></script>
</head>
 
<body>
  <script>
 
  </script>
</body>

If this matches what the Learning React book says, then great! If it doesn’t, I encourage you to always use the version of the libraries listed here instead of what is printed.

Cheers,
Kirupa

Hi there, very nice. I was just looking for that. Hard to type everything out of the video. You forgot to mention or link here under the second lesson. So I came here to post a snippet/github link where someone else can find it, and now you already took care for it. Thanks!

But you should put a link to this here in the video description of lesson 2.

Thank you for the course, I will continue with lesson 4 now.

1 Like

Adding to the video description now! Thanks for the reminder :slight_smile:

2 Likes