3. Put Logic in a Render Function, step 4


#1


I have the below code in the editor, and I am getting the following error:
Friend's

should contain {friend.title}.
I don't understand why I am getting this error, please help me.

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


#2

It's the bug in their website. I accepted the helping code they offer and it didn't help anyways. Error message is still there. If they won't fix it... then I dunno...


#3

Thanks anyway, I will report the bug in their website so it gets fixed. :slight_smile:


#4

I'm having the same issue. I wish there were a way to continue past the bugged lesson while being made to complete it before finishing the class.


#5

Bug is still open. GG Codecademy.

It's pretty bad not to allow people to skip exercises especially if they are buggy.


#6

Yo!! I'm having the same issue as well!!

But someone named @royracer, found a solution. He states that you have to change...

var friend = friends[1] OR var friend = friends[2]

to...

var friend = friends[0] and it will let you pass!!

Apparently there's a bug of some type. Really hope this works for everyone else because this one was very excruciating for me!! LoL. But friends[1] will always sound most appealing to me, regardless. :grinning:


#7

Changing to frends[0] worked for me too! Thanks guys.

However, it seems to be an old bug. I've seen posts about it from September... I wonder when it'll be fixed. :neutral_face:


#8

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