Skip to content

Instantly share code, notes, and snippets.

@ryanjyost
Created January 4, 2020 17:02
Show Gist options
  • Select an option

  • Save ryanjyost/83cd9f37e18b1fb8f291ccdcb0842fe3 to your computer and use it in GitHub Desktop.

Select an option

Save ryanjyost/83cd9f37e18b1fb8f291ccdcb0842fe3 to your computer and use it in GitHub Desktop.
React routing tutorial - 1
import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import * as serviceWorker from "./serviceWorker";
import { BrowserRouter } from "react-router-dom";
ReactDOM.render(
<BrowserRouter>
<App />
</BrowserRouter>,
document.getElementById("root")
);
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment