How to create your own OTP input in React and TypeScript with tests (Part 2)

preview_player
Показать описание

Learn how to build a modern OTP input component in a reactive and reusable way.

#dominicarrojado #react #typescript #reactjs #otp #webdevelopment

Timestamps:
0:00 - Intro
0:17 - Recap
1:07 - Prerequisites
5:47 - Write tests for props
12:06 - Write tests to allow typing of digits
17:27 - Write tests to not allow typing of non-digits
19:13 - Write tests to allow deleting of digits (focus on previous element)
25:04 - Write tests to allow deleting of digits (do not focus on previous element)
27:26 - Write tests to allow pasting of digits
33:34 - Write tests for handling arrow keys
38:04 - Outro

---

Рекомендации по теме
Комментарии
Автор

There has been changes to the Final UI/Code repository to fix a couple of issues on focus:

DominicArrojado
Автор

Dominic, You just single handedly helped me to add a feature at my workplace. I was planning to make it from scratch, it would be a lot of work. But your repo helped me out soo much I appreciate it. Thanks bruv.

the-iter
Автор

There is a issue in this .. if directly type any number on last or any other field other than one... it will start typing from first field but the focus is in another field

prateeksinghchadha