How to access form data in a post request when using React (TypeScript)?
I wanted to create a simple signup page using React in TypeScript. My goal was to create two input fields on a signup page asking for a first and last name, and once the form was submitted, it would redirect the user to a page called "complete" that would display their first and last name. I was able to do this using the get method, as I was able to use url parameters as displayed below. Signup page: import React, { useState, useRef } from 'react'; export default function SignUpPage() { return ( <> <form autoComplete="off" action="/complete" method="get"> <label htmlFor="firstNameInputField">F
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.