1. Use Multline JSX in a Component


#1


https://www.codecademy.com/en/courses/react-101/lessons/react-components-advanced-jsx/exercises/render-multiline-jsx?action=resume


This code is, as suggested in the activity instructions, based on that in QuoteMaker.js: however, it is returned as incorrect any error messages like"Oops! The test returned an error. Maybe you have a syntax error, or a typo. See full error.", additionally, the option to "Get Code" is not provided. Don't think there is any error in the code. What needs to changed for it to work?


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

var QuoteMaker = React.createClass({
  render: function () {
    return (
      <blockquote>
        <p>
          What is important now is to recover our senses.
        </p>
        <cite>
          <a target="_blank"
            href="http://bit.ly/1LvSLUA">
            Susan Sontag
          </a>
        </cite>
      </blockquote>
    );
  }
});

ReactDOM.render(
  <QuoteMaker />,
  document.getElementById('app')
);


#2

I am having the same issue. I typed the code exactly and it returns an error. Eventually, the popup comes up that says "Keep trying!" or "Get code". I click "Get code", and it replaces the code with exactly the same thing. Then when you run it, it works ...


#3

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