<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>
<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/react-101/lessons/react-components-advanced-jsx/exercises/render-function-calculations
<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Hi all, this seemed like a pretty straightforward implementation of “Components and Advanced JSX”, lesson 3, step 4. However, no matter how I’ve finagled the return()
function at the bottom, I always get the following error:
Friend's' <h1></h1> should contain {friend.title}.
The instructions for this step are:
Inside of the return statement, inside of the <div></div>, write a nested <h1></h1>.`
Inside of the <h1></h1>, inject friend.title.
Has anyone else been stuck here?
```var React = require(‘react’);
var ReactDOM = require(‘react-dom’);
var friends = [
{
title: “Yummmmmmm”,
src: “https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-monkeyweirdo.jpg”
},
{
title: “Hey Guys! Wait Up!”,
src: “https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-earnestfrog.jpg”
},
{
title: “Yikes”,
src: “https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-alpaca.jpg”
}
];
// New component class starts here:
var Friend = React.createClass({
render: function() {
var friend = friends[1];
return (
<div>
<h1>
{friend.title}
</h1>
</div>
);
}
});
<do not remove the three backticks above>