react sticky footer code example

Example 1: how to make sticky footer with react router

<div id="container">
    <Header loaded={loaded} />
    <div id="main-content">
      <Switch>
        <Route
          path="/about"
          render={props => <About loaded={loaded} {...props} />}
        />
        <Route
          exact
          path="/"
          render={props => <MainPage loaded={loaded} {...props} />}
        />
        <Redirect to="/" />
      </Switch>
    </div>
    <Footer />
  </div>

Example 2: how to make sticky footer with react router

#container {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

#main-content {
  flex: 1;
}