Skip to content

Instantly share code, notes, and snippets.

Created Oct 6, 2021
What would you like to do?
// App.js
import React from "react";
import Home from "./pages/Home";
import Singlepost from "./pages/SinglePost";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import "react-loader-spinner/dist/loader/css/react-spinner-loader.css";
import Navigation from "./components/Navigation";
function App() {
return (
<div className="App">
<Navigation />
<Route path="/" exact component={() => <Home />} />
<Route path="/:id" exact component={() => <Singlepost />} />
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment