This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Link to article: https://patricia-pan.medium.com/react-router-dom-how-to-pass-in-props-within-a-redirect-d414a46bcd60 | |
// The below code is for a React component (Signup.js) where a user fills out a form to create an account. | |
// Afterward, the page redirects to the Login page (Login.js) where the email address is already populated. | |
import React, { useState } from 'react' // Using function-based React. | |
import { Redirect } from 'react-router-dom' | |
const Signup = (props) => { | |
// Our state variables. |