This is new territory! You’ve never seen a component rendered by another component before.

You have seen a component rendered before, though, but not by another component. Instead, you’ve seen a component rendered by ReactDOM.render().

When a component renders another component, what happens is very similar to what happens when ReactDOM.render() renders a component.



You can see two files in the code editor: ProfilePage.js and NavBar.js.

In this lesson, you are going to make a <ProfilePage /> render a <NavBar />.

How do you do that? To start, simply make ProfilePage‘s render() method return a <NavBar /> instance.

In ProfilePage.js, place a <NavBar /> on line 9.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?