delphimvcframework/samples/react/WebApp/src/routers.js
angelosobreira 2ab97c6f65 React Demo
2020-08-08 17:24:20 -03:00

18 lines
493 B
JavaScript

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;