Getelementbyid argument should it be its filename or somethingelse


#1

WH GETELEMENTBYID HERE USES APP. WONT IT SHOULD BE ITS FILE NAME AS HERE WE ARE RENDERING IT...WHY IS APP USED AS OUR FILE NAME IS NOT APP

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

var ProfilePage = React.createClass({
  render: function () {
    return (
      <div>
        <NavBar />
        <h1>All About Me!</h1>
        <p>I like movies and blah blah blah blah blah</p>
        <img src="https://s3.amazonaws.com/codecademy-content/courses/React/react_photo-monkeyselfie.jpg" />
      </div>
    );
  }
});

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

https://www.codecademy.com/courses/react-101/lessons/components-render-each-other/exercises/component-render-action?action=lesson_resume&link_content_target=interstitial_lesson


#2

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