Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class App extends Component {
- render() {
- return (
- <Router>
- <Switch>
- <Route path='/' exact component={Home}/>
- <Route path='/auth' component={User}/>
- </Switch>
- </Router>
- );
- }
- }
- constructor(props){
- super(props);
- this.state = {
- username: '',
- email: '',
- post: '',
- }
- }
- UserInfo = () => {
- const {username,email, post} = this.props
- return(
- <Fragment>
- <Header/>
- <h1>{username}</h1>
- <h1>{email}</h1>
- <h1>{post}</h1>
- </Fragment>
- )
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement