delphimvcframework/samples/react/WebApp/src/routers.js

18 lines
493 B
JavaScript
Raw Normal View History

2020-08-08 22:24:20 +02:00
import React from 'react';
import {BrowserRouter, Switch, Route} from 'react-router-dom';
import Customers from './components/customers';
import Customer from './components/customer';
const Routers =()=>(
<BrowserRouter>
<Switch>
<Route exact path='/' component={Customers} />
<Route path='/customer/:id' component={Customer} />
<Route path='/customer' component={Customer} />
</Switch>
</BrowserRouter>
)
export default Routers;