Join egghead, unlock knowledge.

Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Unlock This Lesson
1×
Become a member
to unlock all features
Autoplay

    Use the React Router v4 Link Component for Navigation Between Routes

    Joe MaddaloneJoe Maddalone
    reactReact
    15 - 16
    react-routerReact Router
    ^4.0.0

    If you’ve created several Routes within your application, you will also want to be able to navigate between them. React Router supplies a Link component that you will use to make this happen.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Transcript

    Transcript

    00:00 We can create navigation elements for a router by bringing in the component from the React Router library. You can see here I've got three paths -- one for Home, About, and Contact. We're here on the Home path. If I go to /about, we get our About, and likewise for Contact.

    00:19 To use the component, I'm going to go ahead and create a new component here called . I'm going to wrap everything up in a

    Discuss

    Discuss