Last active
September 13, 2020 10:28
-
-
Save srezasm/1bf58886aecf04f002b4710d9f9cdee5 to your computer and use it in GitHub Desktop.
Revisions
-
srezasm revised this gist
Sep 13, 2020 . 3 changed files with 17 additions and 22 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ 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 hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,18 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,3 @@ import React from "react"; export const AskPage = () => <h1> This is AskPage </h1>; -
srezasm revised this gist
Sep 13, 2020 . No changes.There are no files selected for viewing
-
srezasm revised this gist
Sep 13, 2020 . No changes.There are no files selected for viewing
-
srezasm revised this gist
Sep 13, 2020 . 1 changed file with 13 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,18 @@ import React from 'react'; import { BrowserRouter, Route, Link } from 'react-router-dom'; import { AskPage } from './AskPage'; const App = () => { return ( <React.Fragment> <h1>Hello! this is HomePage</h1> <Link to="/ask">AskPage</Link> <BrowserRouter> <Route path="/ask" component={AskPage} /> </BrowserRouter> </React.Fragment> ); }; export default App; -
srezasm created this gist
Sep 13, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ import React from 'react'; import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'; import { HomePage } from './HomePage'; import { AskPage } from './AskPage'; const App = () => { return ( <BrowserRouter> <Switch> <Redirect from="/home" to="/" /> <Route exact path="/" component={HomePage} /> <Route path="/ask" component={AskPage}/> </Switch> </BrowserRouter> ) } This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ import React from 'react'; export const AskPage = () => { return <h1> This is AskPage </h1> }