Sallo Szrajbman 14bf673677 BAEL-4842 - Use React and Spring Boot to Build a Simple CRUD App
Initial source module for the article
2021-03-28 17:00:33 +01:00

22 lines
602 B
JavaScript

import React, { Component } from 'react';
import './App.css';
import Home from './Home';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import ClientList from './ClientList';
import ClientEdit from "./ClientEdit";
class App extends Component {
render() {
return (
<Router>
<Switch>
<Route path='/' exact={true} component={Home}/>
<Route path='/clients' exact={true} component={ClientList}/>
<Route path='/clients/:id' component={ClientEdit}/>
</Switch>
</Router>
)
}
}
export default App;