Error gooseImg should be equal to an img element


I dont know why give me error

var React = require('react');
var ReactDOM = require('react-dom');

var goose = '';

// Declare new variable here:
var gooseImg = (
    src={goose} />);

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


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


i just tried, but doesnt work


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.


nope, even that edit doesnt work


Try removing the parentheses when you define gooseImg.


i wrote and now works

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

that's weird


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