Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Basics 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

Chris Ozag
Chris Ozag
17,111 Points

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.