11.ReactDomRender()


#1

What's wrong with this code?

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

// Write code here:
ReactDOM.render()
<h1>Render me!</h1>
  document.getElementById('app');

#2

Hi Douglas,

In order to pass any arguments to ReactDOM.render(), you need to put those arguments inside of its ( ) and separate the arguments with a comma.

Note the example from that exercise:

ReactDOM.render(<p>I am a paragraph!  Render me please!</p>, document.getElementById('app'));

#3

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