Does this Page have a Bug?

<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-102/lessons/proptypes/exercises/proptypes-stateless?user_id=579c355e9ad7f55240000004

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Will not produce any corrective instruction at al. Could be a bug as suggested before, does not operate like any other page on Codecademy

```

var React = require(‘react’);

function GuineaPigs (props) {
return

{GuineaPigs.message}

;
}

GuinePigs.propTypes = {
message: React.PropTypes.string.isRequired
};

<div>
  <h1>Cute Guinea Pigs</h1>
  <img src={src} />
</div>

);
}

module.exports = GuineaPigs;

<do not remove the three backticks above>

I’m stuck on this one as well. The propType refers to a string in an array. I’ve tried all propTypes though - no luck.
Also, in this example I think they expect the propType to be be declared outside of the function. Here’s my code (it doesn’t pass):

var React = require('react');

function GuineaPigs (props) {
  var src = props.src;
  return (
       <div>
        <h1>Cute Guinea Pigs</h1>
        <img src={src} />
      </div>
  );
}
GuinePigs.propTypes = {
  src: 
  React.PropTypes.string.isRequired
};

module.exports = GuineaPigs;

This one passes for me:

var React = require('react');

function GuineaPigs (props) {
  return (
  <div>
        <h1>Cute Guinea Pigs</h1>
        <img src={props.src} />
      </div>
  )
};

GuineaPigs.propTypes = {
  src: React.PropTypes.string.isRequired
};

module.exports = GuineaPigs;
1 Like

Thanks! Worked for me too, after a bit of fiddling (the editor didn’t like it when I left a space between the function declaration and the return statement)

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