Тёмный

How to use REACT HOOK FORM with TYPESCRIPT 

Maksim Ivanov
Подписаться 29 тыс.
Просмотров 21 тыс.
50% 1

📘New Course: Build full-stack React Typescript applications tsreact.maksim...
Today we learn how to use React Hook Form with Typescript. I'll create a react application using create react app with typescript template and then i'll define a form that will be handled by react-hook-form
🐦 Twitter: / ivanov_dev
I write about React and TypeScript there
Code: github.com/sat...
Where to find me:
Discord: / discord

Опубликовано:

 

4 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 27   
@AntonioBrandao
@AntonioBrandao 4 года назад
Lol this channel is ridiculously underviewed. Keep it up though
@bukenoff
@bukenoff 4 года назад
I like how you make your videos. Straight to the point and very instructive. No nonsense. Question: should you wrap handleSubmit inside useCallback, like every other function inside functional component?
@satansdeer1
@satansdeer1 4 года назад
Serik B thanks, no don't do it preliminarily, most likely you don't need it. Only do it if you know it will be a performance concern otherwise. Usually it's not
@pixelxchange
@pixelxchange 2 года назад
Your video help me a lot Thank you so much
@faradniftaly8893
@faradniftaly8893 3 года назад
Great video very clean explanation ... Thx!
@CushiMusi1
@CushiMusi1 4 года назад
Love your videos! could you explain about decorators in typescript ?
@satansdeer1
@satansdeer1 4 года назад
Idan Gigi sure
@serdcevputi
@serdcevputi 3 года назад
Спасибо Макс! Хорошо объясняешь!
@trumpa94
@trumpa94 3 года назад
This no loger works :( You get an error when you try to place ref on an element
@ilianekrasov4807
@ilianekrasov4807 3 года назад
same shit... did you figure it out, how to handle this?
@trumpa94
@trumpa94 3 года назад
@@ilianekrasov4807 i found some custom solution. just google react hook form custom reducer, smthng like that
@iPingOi
@iPingOi 3 года назад
{...register('password', { required: true })} -> name="password"
@NK-xk6bb
@NK-xk6bb 2 года назад
I had the same issue and i found that replacing the input element following this convention worked! const {register, handleSubmit, formState: {errors} } = useForm()
@Jonsy
@Jonsy 2 года назад
@@NK-xk6bb You just saved me so much time man thank you!!!
@Kedarbhokare
@Kedarbhokare 4 года назад
Thanks for the video, can you please make video on cloud function for server side pagination, use firebase if possible, and how to change pages on client side, thanks in advance
@amariliscamargo
@amariliscamargo 2 года назад
Muito obrigada!!!!! Me ajudou demais 😊
@battmarn
@battmarn 3 года назад
This just saved my ass. Thanks man
@diegor5805
@diegor5805 4 года назад
Thank you very mouch!
@mykemacedo696
@mykemacedo696 2 года назад
Vlw, me ajudou muito
@thomaschalanson8643
@thomaschalanson8643 2 года назад
Hello and thanks for your tutorial because i'm begin with Typescript. I try to upload images file with an input file but i got this error and i don't understand how to fix it ? can you say me what's wrong in my code please ? Type '(event: FormEventHandler) => void' is not assignable to type 'FormEventHandler'. Property 'target' does not exist on type 'FormEventHandler'. here my function : function formHandler(event: React.FormEventHandler) { event.preventDefault(); const selectedImg = event.target.files && event.target.files[0]; console.log(selectedImg); if (selectedImg && Types.includes(selectedImg.type)) { setFile(selectedImg); setError(""); } else { setFile(null); setError("Please select an file file like png or jpg or svg or webp"); } uploadfiles(file); setShowProgress(!showProgress); }
@rickyalmeida
@rickyalmeida 4 года назад
Hi, Maskim. Great content as usual, thank you! Let me ask you something, what is the name of your theme on VSCode?
@satansdeer1
@satansdeer1 4 года назад
Ricky Almeida ocean something something from the material theme
@maisaan9075
@maisaan9075 3 года назад
How would you do this with reusable components? With the ability to pass required, patterns, min, max etc
@justirva
@justirva 2 года назад
You should create the reusbale form component first. Then just use the reusable form with the hook useForm
@aarovas
@aarovas 3 года назад
Макс
@almukhametovar
@almukhametovar 2 года назад
V6
@Pareshbpatel
@Pareshbpatel Год назад
{{2023-03-19}
Далее
How to type React events with TypeScript
2:37
Просмотров 11 тыс.
React Hook Form - Complete Tutorial (with Zod)
28:22
Просмотров 118 тыс.
Women’s Celebrations + Men’s 😮‍💨
00:20
Просмотров 3,3 млн
🎙Пою РЕТРО Песни💃
3:05:57
Просмотров 1,3 млн
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
Formik vs React Hook Form - Let's Build a Login Form
7:05
Mastering React Hooks with Typescript
55:12
Просмотров 100 тыс.
React Hook Form V7 - Get Started
15:52
Просмотров 92 тыс.
How to use TypeScript with React... But should you?
6:36
Women’s Celebrations + Men’s 😮‍💨
00:20
Просмотров 3,3 млн