Render a logic function 3/7 for ReactJS part 1 - Even the given trouble code does not function


#1


Okay now more trouble with this exercise what to do when the code doesn't work when i get a pop up on the screen for "Having trouble with the code - Get Code selected", I run the code after trouble shooter solves code difficulties. But even the supplied code doesn't function. I tried seeing if the image for title: "Hey Guys! Wait Up!",
src: "https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-earnestfrog.jpg"
}, even functioned on a different web page. When I entered the link it took sometime for it to process on the screen. It seems that this may be the culperate instead of my supplied correction code entered.
Not sure what to do next cause i can not go any further with the course with a computer program glitch. Can you help me today? or should i move on to another course provider.


https://www.codecademy.com/courses/react-101/lessons/react-components-advanced-jsx/exercises/render-function-calculations?action=lesson_resume&link_content_target=interstitial_lesson


I have even tried changing the <img friends[0] function , then [1] and then [2], but none seem to function the "Hey Guys! Wait Up! image.


Replace this line with your code. 
var Friend = React.createClass({
  render: function () {
    var friend = friends[2];
    return (
      <div>
        <h1>{friend.title}</h1>
        <img src={friend.src} />
      </div>
    );
  }
});

ReactDOM.render(
  <Friend />,
  document.getElementById('app')
);[poll type=number min=1 max=20 step=1 public=true]
[/poll]


#2

Hi, I was just about to write to confirm this bug as I've been unable to move past it for the past half an hour or so - receiving error messages when I know I've done it correctly.
I just went through it step-by-step again though and it didn't put in error messages so maybe they've fixed it?

It is frustrating that you have to answer a lot of the React steps in an activity one part at a time though.
This activity has 6 parts and if you put in all the correct code in one go it errors saying '

' should be empty. That's true for step 2 but in step 3 you fill it in. 'running' between each step would be fine but Codecademy seems to be much slower these days (or maybe it's just React course due to compilation times), so running can take up to 20 second on a great internet connection.

#4

Try with the friend[0] and this works.

var friend = friends[0];


#5

thanks you!
i had the same issue :slight_smile: and with friends[0] no error


#6

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