Skip to content

Commit

Permalink
feat(ui): add React Router HashRouter around TodoList component
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbodden committed Feb 23, 2021
1 parent 49e9003 commit bcc71ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/webapp/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import TodoList from './components/todo_list';
import Footer from './components/footer';

import { TodosContextProvider } from "./context/todos_context";
import { HashRouter as Router, Route } from "react-router-dom";

ReactDOM.render(
<TodosContextProvider>
Expand All @@ -14,7 +15,9 @@ ReactDOM.render(
<h1>todos</h1>
<TodoForm />
</header>
<TodoList />
<Router>
<Route path="/:filter?" component={TodoList} />
</Router>
</section>
<Footer />
</TodosContextProvider>,
Expand Down

0 comments on commit bcc71ea

Please sign in to comment.