7. Variable Attributes in JSX


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}


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


writing it on one line helped, thanks


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