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 One Solution

The browser didn't show anything

I completed the exercise, the I mede a few corrections on my code based on de second video, but the browser didn't show anything. I had a similar problem with the workspace at the course, and the problem was the first list. I don't know if the problem is the list, the fact that I'm using workspaces instead of React or maybe an other reason.

at this very moment my code is exactly the same as the teacher's code

The console show me this problem: babel.min.js:7 Uncaught SyntaxError: http://port-80-tmqiro9syd.treehouse-app.com/app.js: Expected corresponding JSX closing tag for <img> (78:8) 76 | <div> 77 | <img src={props.url} alt={props.name}>

78 | </div> | ^ 79 | <h2>{props.name}</h2> 80 | <p>{props.desc}</p> 81 | <h3>Planet Profile</h3> at t.J.raise (babel.min.js:7) at t.ge.jsxParseElementAt (babel.min.js:8) at t.ge.jsxParseElementAt (babel.min.js:8) at t.ge.jsxParseElementAt (babel.min.js:8) at t.ge.jsxParseElement (babel.min.js:8) at t.parseExprAtom (babel.min.js:8) at te.parseExprSubscripts (babel.min.js:6) at te.parseMaybeUnary (babel.min.js:6) at te.parseExprOps (babel.min.js:6) at te.parseMaybeConditional (babel.min.js:6)

1 Answer

Martin Sole
Martin Sole
82,199 Points

Hi

Going on the above, it appears the img element doesn't have a closing slash. In React all elements must be closed either with the self-closing format or with a corresponding closing tag. So it should appear like <img src={props.url} alt={props.name} />

If you look in your console you'd see that information. Anytime something isn't doing something you think it should, log log log and log some more.