This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
react-rest-request/examples/movies/src/app.tsx
Dmitriy Pleshevskiy a1574769e9 feat(request-hook): add on failure callback
* fix(client): remove destruction from response
* chore: update example

Add single endpoint, add router, add pages

Closes #9
2020-11-06 00:58:43 +03:00

19 lines
487 B
TypeScript

import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom'
import { MoviePage, MoviesPage } from './pages';
export default function App() {
return (
<BrowserRouter>
<Switch>
<Route exact path='/'>
<MoviesPage />
</Route>
<Route exact path='/:id'>
<MoviePage />
</Route>
</Switch>
</BrowserRouter>
)
}