Error gooseImg should be equal to an img element


#1


I dont know why give me error


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 = (
	<img 
    src={goose} />);

ReactDOM.render(gooseImg, document.getElementById('app'));


#2

Simple fix! You just need a space between {goose} and the forward-slash (/)


#3

i just tried, but doesnt work


#4

Try it again, but replace the variable with this:

( <img src={goose} /> );

Or put your own code all on one line, and it might make it easier to spot a bug.


#5

nope, even that edit doesnt work


#6

Try removing the parentheses when you define gooseImg.


#7

i wrote and now works

var gooseImg = (
<img src={goose} />);

that's weird


#8

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