Skip to content

Instantly share code, notes, and snippets.

@srezasm
Last active September 13, 2020 10:28
Show Gist options
  • Save srezasm/1bf58886aecf04f002b4710d9f9cdee5 to your computer and use it in GitHub Desktop.
Save srezasm/1bf58886aecf04f002b4710d9f9cdee5 to your computer and use it in GitHub Desktop.
lazyLoadingRoutes B4
import React from "react";
import { BrowserRouter, Route, Link, Switch } from "react-router-dom";
import AskPage from "./AskPage";
const App = () => {
return (
<BrowserRouter>
<Link to="/ask">AskPage</Link>
<Route exact path="/ask" component={AskPage} />
</BrowserRouter>
);
};
export default App;
import React from "react";
export const AskPage = () => <h1> This is AskPage </h1>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment