How and where to delete the original GuineaPigs as per the instruction?

Hi all,
I am unable to understand the instruction. I rewritten the code in the form of stateless functional component in GuineaPigs.js file. I don’t know where to delete the original GuineaPigs class. Please help me out!

Thanks in advance
Here is the link to my code

I’m stuck on this one as well. I also can’t get to your code. My code right now is just;

var React = require('react');
var ReactDOM = require('react-dom');

var GuineaPigs = React.createClass({
  render: function () {
    return <h1>{this.props.title}</h1>;

	<GuineaPigs />,

I’m in no big rush to get it solved though. Maybe if you post your code, we could help each other.

I am done with this course. You need to re write your GuineaPigs in the form of function, as per the instruction looking at Example.js file. Here is my code for reference.

var React = require('react');

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

module.exports = GuineaPigs;

Got it, thanks. I must have overlooked something while trying to complete the section.

Not a Problem :slight_smile:

Thank you for your message. I found the answer how to make GuineaPigs.propTypes. I was stuck with that and thinking to ask help here.

Hi I am stuck on this exercise with an error message (below) that is not helpful.
I tried copy pasting the code provided by @webblaster78944. Is anbody else getting this error?

Here’s the error message I get:

Warning: Failed propType: Required prop src was not specified in GuineaPigs.

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