SHARE
TWEET

Untitled

a guest Aug 17th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import React, { Component } from 'react';
  2. import { BrowserRouter as Router, Route } from 'react-router-dom';
  3. import './App.css';
  4.  
  5. import CreateBook from './components/CreateBook';
  6. import ShowBookList from './components/ShowBookList';
  7. import ShowBookDetails from './components/ShowBookDetails';
  8. import UpdateBookInfo from './components/UpdateBookInfo';
  9.  
  10. class App extends Component {
  11.   render() {
  12.     return (
  13.       <Router>
  14.         <div>
  15.           <Route exact path='/' component={ShowBookList} />
  16.           <Route path='/create-book' component={CreateBook} />
  17.           <Route path='/edit-book/:id' component={UpdateBookInfo} />
  18.           <Route path='/show-book/:id' component={ShowBookDetails} />
  19.         </div>
  20.       </Router>
  21.     );
  22.   }
  23. }
  24.  
  25. export default App;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top