score:3

Accepted answer
class Home extends Component {
  constructor(props) {
    super(props);
    this.state = { appTitle: "better craigslist" };
  }

  render() {
    return (
      <React.Fragment>
        <Helmet>
          <title>{this.state.appTitle}</title>
        </Helmet>
        <Router>
          <Switch>
            <Route path="/sell">
              <h1>Test</h1>
            </Route>
            <Route path="/">
              ...
              <div className="col s12 center">
                <Link to="/sell">
                  <button className="btn" id="create-listing-button">
                    Create Listing
                  </button>
                </Link>
              </div>
            </Route>
          </Switch>
        </Router>
      </React.Fragment>
    );
  }
}

Related Query

More Query from same tag