Тёмный
No video :(

Full React Tutorial #28 - Submit Events 

Net Ninja
Подписаться 1,6 млн
Просмотров 168 тыс.
50% 1

Hey gang, in this React tutorial we'll take a look at form submit events & how to react to them.
🐱‍💻 🐱‍💻 Course Files:
+ github.com/iam...
🐱‍👤🐱‍👤 JOIN THE GANG -
/ @netninja
🐱‍💻 🐱‍💻 My Udemy Courses:
+ Modern JavaScript - www.thenetninj...
+ Vue JS & Firebase - www.thenetninj...
+ D3.js & Firebase - www.thenetninj...
🐱‍💻 🐱‍💻 Helpful Links:
+ HTML & CSS Course - • HTML & CSS Crash Cours...
+ Modern JavaScript course - • Modern JavaScript Tuto...
+ Get VS Code - code.visualstu...
🐱‍💻 🐱‍💻 Social Links:
Facebook - / thenetninjauk
Twitter - / thenetninjauk
Instagram - / thenetninja

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

 

5 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 56   
@maskman4821
@maskman4821 3 года назад
~Notes~ Handle form submission in reactjs 1. assign a handler to submit event in form element 2. within submit handler we prevent page refresh 3. implement post request with fetch api to send post data to designated api thats all !!!
@victorvondoom2350
@victorvondoom2350 2 года назад
i wish there were more helpful people like you . you turn the world less stupid because of your comment. you may know this but your comment has enlightened me , quite deeply .
@rakeshwasnik9327
@rakeshwasnik9327 Год назад
do you have the same for other videos in the series as well
@TheRahulDBZ
@TheRahulDBZ 3 года назад
I am watching these videos like a TV series with each new episode coming everyday. Thanks
@shinchanshukla3938
@shinchanshukla3938 2 года назад
ohooooooooooooo
@dailybread8990
@dailybread8990 Год назад
Your tutorials are so so good. Iean they are the best. Simple, easy and straight to the point. I would really love a web3 tutorial with solidity, ethers, react and hardhat 🙏
@NetNinja
@NetNinja Год назад
Thank you :)
@lorenzolonghi8697
@lorenzolonghi8697 Год назад
Your tutorials are really so clear, useful, straight to the point and not long. The value you bring with your video is just incredibile. Thank you so much for everything you do
@Ari-pb4uo
@Ari-pb4uo 2 года назад
WOWW. You're videos have big a game changer. You explain everything perfectly. MY FAVEEEE . I am soo happy to have discovered your channel!
@AlexFeature
@AlexFeature Год назад
2:21 I respect your authoritah!
@Anon19933
@Anon19933 4 месяца назад
Thank you very much, Shaun. Great Work!!
@johncmm9759
@johncmm9759 2 года назад
Insanely high value videos. Thank you so much!
@user-wq3vr3yy9k
@user-wq3vr3yy9k Год назад
Incredibly useful! Thanks!
@NetNinja
@NetNinja Год назад
Thanks Caleb! :)
@kalltreaionc
@kalltreaionc 8 месяцев назад
Thank you --- your courses are top notch. Natural born teacher... we appreciate you sir.
@NetNinja
@NetNinja 8 месяцев назад
That means a lot :) thank you!
@Mahmudulhasan-ts5hm
@Mahmudulhasan-ts5hm 3 года назад
thanks brow
@vp--
@vp-- Год назад
Thank you
@NetNinja
@NetNinja Год назад
You're welcome Vivek!
@andromilk2634
@andromilk2634 6 месяцев назад
But even if we didn't use the preventDefault, wouldn't our event function still be fired and do its actions? Is there a reason we want to prevent the refresh of the page after we submit our form?
@son7459
@son7459 4 месяца назад
May I ask, why is "clicking the button" automatically understood as the action "submitting the form" ? I mean, you don't put type="submit" inside the button, it's literally just a button with no function. I wonder if onSubmit auto assigns the button as the submit handler? If anyone can help, thank you!
@rafiashan8389
@rafiashan8389 Месяц назад
Amazing sirrrr
@Ridhu
@Ridhu 3 года назад
Any novice teacher would have combined this video and the next video as a single video. This is where you make a difference by abstracting submit event and post request
@hasanalkhder6260
@hasanalkhder6260 3 года назад
After the great course i think it will be good to start work on some projects , so we will wait for the video's dear Thanks
@perschonca
@perschonca 2 года назад
I don't know how or when it happened but at some point my application in create.js tried to import e from 'express' which was giving me a bunch of errors. I was losing my mind as my code was identical to the github and then i realized this import was sitting at the top. Removed it and we are back at it lol. Wow that was frustrating LMAO. to clarify i have been following this tutorial to a T and think bill gates had something to do with it. In fact, im positive billy is the culprit, a truly sick person trying to derail a new dev. NOT TODAY BILLY, NOT TODAY.
@BizzaroBrainBoi
@BizzaroBrainBoi 11 месяцев назад
damn this guy is good, thank you net ninja!
@alfonsoramirezelorriaga1153
@alfonsoramirezelorriaga1153 2 года назад
Thank you. May God bless you
@alexberdea
@alexberdea Год назад
Consolelogtheblog!! clb , baby
@tabmax22
@tabmax22 2 года назад
So is the action attribute not general practice for submitting forms in React?
@Avatar-Roku
@Avatar-Roku Год назад
2:01...hey why are we defining the object with the elements title,body and author?? Why can't we take something else?
@javim7189
@javim7189 3 года назад
thank you very much this video was very helpful
@Dev_who_decodes
@Dev_who_decodes 3 года назад
how is it the blog object contains the information from form???
@freddyescobar96
@freddyescobar96 2 года назад
it's simple javascript, when the key and value have the same name, you can do this: const blog = { title: title, body:body, author: author} it's the same to do const blog ={title,body, author} that means that the value of that object have the same name as in the state variables
@ammaralhomyqani9079
@ammaralhomyqani9079 2 года назад
@@freddyescobar96 thank u so much, hope good day for you
@akhrorbekabdukhamitov8872
@akhrorbekabdukhamitov8872 2 года назад
love the series. let me know if you guys have a question so far. I will try to help with debugging
@iotrnd2384
@iotrnd2384 2 года назад
its really good stuff
@GustavoHenrique-dm7lh
@GustavoHenrique-dm7lh 3 года назад
amazed with this videos :)
@woofcode3383
@woofcode3383 2 года назад
thanks so much
@yema8319
@yema8319 3 года назад
Eyyyyy I made it here!
@ahmedel-hindawi9226
@ahmedel-hindawi9226 3 года назад
same
@bradconklin3415
@bradconklin3415 2 года назад
How does it know that the button should trigger a "submit event"? Couldn't the button have some other function?
@sean_of_possession
@sean_of_possession Год назад
Not sure if you got your answer or not (late reply), but here it is: if you only have 1 button inside your form tags, that button's default type becomes 'submit.' This applies UNLESS you explicitly change the type attribute of the button to something other than 'submit', such as 'button'. The only button on your form with no type attribute set will automatically trigger the onSubmit function for the form.
@lofi_Insomnia_
@lofi_Insomnia_ 3 года назад
ty
@unknownman1
@unknownman1 3 года назад
Thanks.
@aybak3k
@aybak3k 3 года назад
got a question idk if it's dumb or ! but how is it being submitted without having the btn have a type submit attr?????
@Cedielagekohaha
@Cedielagekohaha 3 года назад
because of the form, when you click a button inside a form it will trigger a submit
@minhnguyenquocnhat3796
@minhnguyenquocnhat3796 Год назад
@@Cedielagekohaha what happens if there are multiple buttons? How to assign different tasks to them if they are in the same form?
@sean_of_possession
@sean_of_possession Год назад
@@minhnguyenquocnhat3796 What @Cedric Sarigumba said applies ONLY if the button inside the form tags is the ONLY button in the form. If it is the only button, its type attribute defaults to 'submit' and will call the function in the onSubmit for the form. If you have multiple buttons inside your form tags, you will need to explicitly define the type attribute for one of them as 'submit'. The other buttons will default to 'button' unless you explicitly specify otherwise.
@jagaroTV
@jagaroTV 8 месяцев назад
Im getting these errors..
@saidbekuz
@saidbekuz 3 года назад
Heyyy Bro, How are you i am copying your videos in my mother language , i s that ok?
@intensiveadvancedmath5281
@intensiveadvancedmath5281 Год назад
Qani?
@victorcardenas724
@victorcardenas724 2 года назад
@tarekghosn3648
@tarekghosn3648 2 года назад
e.preventDefault() never new why i used it.
@satyam1543
@satyam1543 Год назад
to prevent page from loading when we click on submit button
@ridl27
@ridl27 3 года назад
ty
Далее
Full React Tutorial #29 - Making a POST Request
5:18
Просмотров 228 тыс.
Full React Tutorial #27 - Controlled Inputs (forms)
9:27
All The JavaScript You Need To Know For React
28:00
Просмотров 608 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 474 тыс.
React vs Angular in 2024
9:00
Просмотров 48 тыс.
You might not need useEffect() ...
21:45
Просмотров 159 тыс.
Full React Tutorial #25 - Route Parameters
8:03
Просмотров 207 тыс.
Login Form Submit in React Js in Hindi in 2020 #35
19:20
React Js Form Handling - React Js Tutorial
28:39
Просмотров 39 тыс.