Getting Started with React Router

Displaying a Component on a Route


Now that the routing is in place, let's scaffold out the Login component. For now, this component will just contain HTML, so there's no need for a mapStateToProps() or mapDispatchToProps() function. Specifically, this component will just contain a form with an input for the user to enter their email and password.

Create the Login component


import React from 'react';
import { connect } from 'react-redux';

class Login extends React.Component {
  render() {
    return (
      <div className="auth-page">
        <div className="container page">
          <div className="row">

            <div className="col-md-6 offset-md-3 col-xs-12">
              <h1 className="text-xs-center">Sign In</h1>
              <p className="text-xs-center">
                  Need an account?


                  <fieldset className="form-group">
                      className="form-control form-control-lg"
                      placeholder="Email" />

                  <fieldset className="form-group">
                      className="form-control form-control-lg"
                      placeholder="Password" />

                    className="btn btn-lg btn-primary pull-xs-right"
                    Sign in



export default connect(() => ({}), () => ({}))(Login);

I finished! On to the next chapter