Skip to content

MahdyarEn/react-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

Simple Register / Login form with React.

image

You can easily add the registration form and login form to your project using the files.

Also note that you should use your database to store and retrieve information, in this project this is done using a PHP script and it is just for testing.

(This method is used in files: Login.js and SignUp.js)


Using

Just download files and run following command in terminal:

npm install

After installing, you can use Login/Register form in your project Wherever you want

<Switch>
  <Route path="/login" component={Login} />
  <Route path="/signup" component={SignUp} />
  <Redirect from="/" to="/signup" />
</Switch>

But don't forget to import react-router-dom and that components

  import SignUp from "./components/SignUp";
  import Login from "./components/Login";
  import { Route, Switch, Redirect } from "react-router-dom";

Releases

No releases published

Packages

No packages published