React Router comes with some nice components for providing navigation. We are going to use these to implement navigation options in the app header.
Creating navigation
Using the Link component
We are going to use the Link component from React Router to create our navigation options by carrying out the following steps:
- Let's start by creating a new file called Header.tsx with the following imports:
import * as React from "react";
import { Link } from "react-router-dom";
import logo from "./logo.svg";
- Let's create two links using the Link component in a Header function component:
const Header: React.SFC = () => {
return (
<header className="header">
<img...