- The basics of building a One-Time Password (OTP) UI Component with React and TypeScript.
- How to leverage React Hook Form and Zod for front-end UI validation.
- How to use Jest to test user interactions with your component.
You can check out the full blog post here.
Here's how you can get this project up and running on your local machine:
-
Create your directory:
mkdir otp-react-ts
-
Change to your directory:
cd otp-react-ts
-
Clone the repo:
git clone https://github.com/internetdrew/otp-react-ts-vitest.git .
-
Fetch remote branches:
git fetch --all
-
Checkout the branch you want. Not if you want
starter
orfinal
? Find out based on the route you want to take through the post.git checkout -b <branch-name> origin/<branch-name>
-
Once in the desired branch, install dependencies (you will need to do this for each respective branch):
npm i
-
Run the development server:
npm run dev
-
Open localhost:5173 in your browser to see your updates live with hot reloads.
Feel free to reach out to me via Twitter, LinkedIn, or message me directly.