Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript React Basics (2018) Thinking in Components Use a Component with JSX

Tom Beals
Tom Beals
5,447 Points

rI downloaded the project files for this video and react will not render in my browser

Downloaded the files and react wont work

1 Answer

After struggling with this for a long time I think I figured it out. If you're using the project files, you need to do two things:

A. In addition to including the react scripts, you need to include a standalone babel script - put this below the react script tags:

<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>

B. You need to add a 'type' of 'text/babel' to the ./app.js script tag:

<script type="text/babel" src="./app.js"></script>

This wasn't clear at all in the videos but I believe it is what's missing.