Outline
- React/Redux Apps with Valeri Karpov
- Building Real World, Production Quality Apps with React & Redux
- Creating & Running React Projects With create-react-app
- Learn The Fundamentals of Redux
- Creating A Basic React-Redux Project
- Performing HTTP Requests with Custom Middleware
- Getting Started with React Router
- JWT Authentication with React & Redux
- Creating Forms with React & Redux
- CRUD Examples with React & Redux
- Utilizing Component Inheritance
- Implementing a Tabs Component with React & Redux
- Implementing Pagination with React & Redux
- Creating an Article Editor with React & Redux
Outline
- React/Redux Apps with Valeri Karpov
- Building Real World, Production Quality Apps with React & Redux
- Creating & Running React Projects With create-react-app
- Learn The Fundamentals of Redux
- Creating A Basic React-Redux Project
- Performing HTTP Requests with Custom Middleware
- Getting Started with React Router
- JWT Authentication with React & Redux
- Creating Forms with React & Redux
- CRUD Examples with React & Redux
- Utilizing Component Inheritance
- Implementing a Tabs Component with React & Redux
- Implementing Pagination with React & Redux
- Creating an Article Editor with React & Redux
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
src/components/Login.js
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">
<a>
Need an account?
</a>
</p>
<form>
<fieldset>
<fieldset className="form-group">
<input
className="form-control form-control-lg"
type="email"
placeholder="Email" />
</fieldset>
<fieldset className="form-group">
<input
className="form-control form-control-lg"
type="password"
placeholder="Password" />
</fieldset>
<button
className="btn btn-lg btn-primary pull-xs-right"
type="submit">
Sign in
</button>
</fieldset>
</form>
</div>
</div>
</div>
</div>
);
}
}
export default connect(() => ({}), () => ({}))(Login);