Local Host does not show anything


Hi Everyone,


I followed the instructions and when I ran my code, the tasks got ticked off as correct, yet the browser did not display anything. Can anyone see why?


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

var ProfilePage = React.createClass({
  render: function () {
    return (
        <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" />

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

//NavBar.js //

var React = require('react');

var NavBar = React.createClass({
  render: function () {
    var pages = ['home', 'blog', 'pics', 'bio', 'art', 'shop', 'about', 'contact'];
    var navLinks = pages.map(function(page){
      return (
        <a href={'/' + page}>
    module.exports = NavBar;
    return <nav>{navLinks}</nav>;


Put this code to the last line like instruction says:

At the bottom of the file, add the line module.exports = NavBar;


Thank you very much!


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

Component Rendering In Action - Browser Won't Display Content