I am stuck on Advanced JSX - Variable Attributes in JSX


<Below this line, add a link to the EXACT exercise that you are stuck at.>
Advanced JSX - Variable Attributes in JSX

I’m really not too sure what I am doing wrong here. I can click the give me the code option but I don’t really want to do that as it won’t help me understand why my code is not working. Please advise me where I am going wrong :slight_smile:

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

ERROR - After your variable declarations, make sure you start a new line with ReactDOM.render().


var React = require(‘react’);
var ReactDOM = require(‘react-dom’);

var goose = ‘https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-goose.jpg’;

// Declare new variable here:
var gooseImg = ( );

ReactDom.render(gooseImg, document.getElementById(‘app’));

<do not remove the three backticks above>
1 Like

I pretty positive that my code is correct and that it does start on a new line so no idea why I am getting this error.

Your code is right, just remember that the variable is ReactDOM, not ReactDom.
Just a simple typo, happens to the best of us :slight_smile:

If this answers your question, please be so kind as to mark this answer as the solution to your question. Thanks :slight_smile:

1 Like

Ah that’s so dumb, that error message was giving me the impression that I may have forgotten something that made the code start on a new line. such a silly mistake, thanks for your help though.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.