BAEL-4842 - Use React and Spring Boot to Build a Simple CRUD App
Initial source module for the article
This commit is contained in:
22
spring-boot-modules/spring-boot-react/frontend/src/App.js
Normal file
22
spring-boot-modules/spring-boot-react/frontend/src/App.js
Normal file
@@ -0,0 +1,22 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user