Last active
September 13, 2020 10:28
-
-
Save srezasm/1bf58886aecf04f002b4710d9f9cdee5 to your computer and use it in GitHub Desktop.
lazyLoadingRoutes B4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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