What other properties?



error message:
GuineaPigs should have a render function, but no other properties

var React = require('react');

var GuineaPigs = React.createClass({
   render: function () {
    var src = this.props.src;

module.exports = GuineaPigs;


The render property should return a JSX object.


Thanks!! but instructions are:

Inside of the render function, delete this line of logic:

var src = GUINEAPATHS[this.state.currentGP];

... and replace it with this:

var src = this.props.src;

Lastly, delete the var GUINEAPATHS array.

I'm stuck


These courses are difficult to test code in. My code is completed, but I can't say where the steps were completed, and mine does have a returned JSX object. Short of wiping out all my own work to reproduce this error, there is nothing else I can suggest.

I think you may have deleted too much code. This is what the render: function should look like:

  render: function () {
    var src = this.props.src;
    return (
        <h1>Cute Guinea Pigs</h1>
        <img src={src} />

See if that doesn't fix things for you.


many many many thanks!!


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