Skip to content

Instantly share code, notes, and snippets.

I love NYC!

Trisha Pan trisha

I love NYC!
View GitHub Profile
trisha / A-Signup.js
Last active March 15, 2021 22:18
React-Router-DOM: How to pass in props within a Redirect
View A-Signup.js
// Link to article:
// 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.