7. Variable Attributes in JSX


#1


7. Variable Attributes in JSX


I'm not sure what I'm doing wrong. Says "gooseImg should be equal to an element."


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}
                 />
    );


#2

var gooseImg = <img src={goose} />;
Try to make it one line maybe.. I don't know, this seems weird


#3

writing it on one line helped, thanks


#4

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