-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
132 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
import React from "react"; | ||
import { hot } from 'react-hot-loader/root' | ||
import { hot } from "react-hot-loader/root"; | ||
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"; | ||
|
||
const App = () => <div>hoilzzzz</div>; | ||
import Home from "./Home"; | ||
import AsyncPage from "./AsyncPage"; | ||
import NoPage from "./NoPage"; | ||
|
||
const App = () => ( | ||
<Router> | ||
<div> | ||
<Switch> | ||
<Route exact path="/" component={Home} /> | ||
<Route exact path="/async" component={AsyncPage} /> | ||
<Route component={NoPage} /> | ||
</Switch> | ||
</div> | ||
</Router> | ||
); | ||
|
||
export default hot(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
import { Link } from "react-router-dom"; | ||
|
||
const AsyncPage = () => ( | ||
<div> | ||
<div> | ||
<Link to="/">home으로 이동하기</Link> | ||
</div> | ||
AsyncPage 입니당. | ||
</div> | ||
); | ||
|
||
export default AsyncPage; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from "react"; | ||
import { Link } from 'react-router-dom'; | ||
|
||
const Home = () => <div> | ||
<div> | ||
<Link to="/async">async로 이동</Link> | ||
|
||
|
||
</div> | ||
hoilzz 의 home 입니다 | ||
</div>; | ||
|
||
export default Home; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import React from "react"; | ||
|
||
const NoPage = () => <div>404입니다</div>; | ||
|
||
export default NoPage; |