Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. class App extends Component {
  2. render() {
  3. return (
  4. <Router>
  5. <Switch>
  6. <Route path='/' exact component={Home}/>
  7. <Route path='/auth' component={User}/>
  8. </Switch>
  9. </Router>
  10. );
  11. }
  12. }
  13.  
  14. constructor(props){
  15. super(props);
  16. this.state = {
  17. username: '',
  18. email: '',
  19. post: '',
  20. }
  21. }
  22.  
  23. UserInfo = () => {
  24. const {username,email, post} = this.props
  25. return(
  26. <Fragment>
  27. <Header/>
  28. <h1>{username}</h1>
  29. <h1>{email}</h1>
  30. <h1>{post}</h1>
  31. </Fragment>
  32. )
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement