Тёмный

How to create Reusable React Forms? JSON Hooks forms - Part 5 

Kchai Programming
Подписаться 420
Просмотров 21 тыс.
50% 1

How to create Reusable React Forms? In this video, we will use React hook form to create Form component that renders form using JSON. This short series explains everything you need to know to manage forms in React for any use-case.
React Powerhouse
React powerhouse is a series that shows you how you can create powerful web applications using React. This series is for moderate to advanced React users.
📄 Check out the complete playlist - • How to create forms in...
🔴 Subscribe for useful web development content - / @kchaiprogramming6179
Resources
💻 Code link - github.com/ChaitanyaKaranam/r...
📃 React Forms - reactjs.org/docs/forms.html
🎣 React-hook-form - react-hook-form.com/

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

 

22 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@kchaiprogramming6179
@kchaiprogramming6179 4 года назад
Here's the link for the source code - github.com/ChaitanyaKaranam/react-powerhouse
@funmora9140
@funmora9140 2 года назад
How can we pass function to dynamic form
@vicerix
@vicerix Год назад
@@funmora9140 you solved or find an answer somewhere?
@louis-0412
@louis-0412 2 года назад
Version 6.X.X: Version 7.0.X:
@baluchandran5670
@baluchandran5670 3 года назад
My friend, I am a senior IT kind of person. Spent more than three decades in IT. The reason I am saying this, to establish the importance of what I am going to say. First - Wonderful and precise content - Thinking abstract out of the box are very few. After a long time I found one - it is you. I really enjoyed this journey of watching your video. But I was not happy to see the subscribers you got? Probably there is a mistake on your side as well. Then content in this video are really good but can be appreciated only by experienced people quickly. This means, you have to make contents for newbies running basics Piece by piece. We all know Koushik of Javabrains. Trust me, I enjoyed your video as if I am watching him on the show. Try to prepare some basic contents but don't miss to release dense contents like this - otherwise we may fly away :). You have good time ahead. make it natural and keep going.
@prasadreddy1131
@prasadreddy1131 3 месяца назад
I really appreciate him. As you said it's for experienced people level of explanation. To get more subscribers and view, You have to explain little more detail but not too lengthy like UDEMY however i really loved it.
@craigcampbell4712
@craigcampbell4712 2 года назад
This was really great and helpful, thanks so much!
@nick4bizz42
@nick4bizz42 Год назад
react hook form update: From: To:
@nancyhan8535
@nancyhan8535 3 года назад
Thanks for the video. I love it.
@HarshPatel-dv3hm
@HarshPatel-dv3hm Год назад
wonderful ❤
@mithushanjalangan5132
@mithushanjalangan5132 3 года назад
Thanks for this video!
@Pareshbpatel
@Pareshbpatel 2 года назад
A very informative tutorial on creating re-usable React Forms using React-Hook-Form Library. Thanks very much. {2022-03-11}
@sounakroy9284
@sounakroy9284 2 года назад
Great 👍
@MrXperx
@MrXperx 3 года назад
Good stuff
@syedsohailahmed6810
@syedsohailahmed6810 7 месяцев назад
very informative
@pankajmenaria3230
@pankajmenaria3230 2 года назад
Thank you for sharing
@fasttocode
@fasttocode 3 года назад
Thank you.
@aravindm6124
@aravindm6124 2 года назад
fantastic , please upload more videos
@kchaiprogramming6179
@kchaiprogramming6179 2 года назад
Planning to upload more videos soon
@MrCuteguylol
@MrCuteguylol 2 года назад
Hi! This was a wonderful video, however is it possible if you also show us how to integrate the select tag in it? Thanks in advance!
@jaggyjut
@jaggyjut 3 года назад
Cool. Could you show CRUD operations in the form and save it in a table grid within a page and backed as google firestore. Thanks
@priyatam17
@priyatam17 11 месяцев назад
Thanx
@alanfljesus
@alanfljesus Год назад
How can I do this for a password confirmation when both have the case 'password'?
@siyaramrauniyar6929
@siyaramrauniyar6929 Год назад
Not usable with react hook form 7.
@raulrothschild5876
@raulrothschild5876 3 года назад
Maybe you would create a and pass all props to them. Another thing u didn't think about is textarea, select, and the data within radio and checked buttons, useState has a strange behavior when you check and uncheck them. What about all other html inputs attr? Data Picker, file, button? I think creating a switch case for each one is kind bad, idk. Just my opinion, maybe adding custom hooks for validation would be easier.
@kchaiprogramming6179
@kchaiprogramming6179 3 года назад
The example I showed above relies on react-hook-form which is used to create uncontrolled components. So, there is no need to rely on hooks or react state. You need to create similar case statements for all the other elements and for props you can create "props" filed in JSON and can spread it on element , but, this is just a one time activity. This approach is really useful when you have to dynamically control everything using only JSON. This JSON can be dynamically generated from the server and you can manipulate the form fields. If you don't have such use-case then this definitely is an overkill.
@cristhianjhlcom
@cristhianjhlcom 3 года назад
Nice video, congratulations for the great content. I have a question I hope you can help me, I have a invoice form that need a detailed list but I build this detail from another component external to this form how can o validate that details have data and send the array of data with the submit form? Thanks 🤓
@kchaiprogramming6179
@kchaiprogramming6179 3 года назад
You can make these checks at onSubmit function of your form.. alternatively.. you can send array of validations as a prop to your component, whenever onSubmit is fired, you can perform these validations
@dineshkarnhakim
@dineshkarnhakim 2 года назад
Great video. How can I use multiselect and select component with backend api to call?
@kchaiprogramming6179
@kchaiprogramming6179 2 года назад
For select and multiselect, you can have two additional fields, options and selectedOptions.. options would be an array, you can loop through them and render options, selectedOptions would be an array of strings or a string based on multiselect or select
@jrmsrs
@jrmsrs 2 года назад
In a Django Rest Framework API when you use OPTIONS method you'll get a response like: { "name": "Table", "description": "", "renders": [ "application/json", "text/html" ], "parses": [ "application/json", "application/x-www-form-urlencoded", "multipart/form-data" ], "actions": { "POST": { "id": { "type": "integer", "required": false, "read_only": true, "label": "ID" }, "name": { "type": "string", "required": true, "read_only": false, "label": "Name", "max_length": 50 }, } } } } Would I be able to do something similar to get the fields of objects in "actions. POST" in this more dynamic way? Since it's not an array I think i can't do table.map() for example
@kchaiprogramming6179
@kchaiprogramming6179 2 года назад
The keys of object POST seems off, but still, you can use Object.keys to loop through keys and access elements using actons.POST[key] or you can just loop thourgh values using Object.values
@ievabroberg5312
@ievabroberg5312 2 года назад
I think there had been some changes for ref since the video and now validationProps don't work, having problems rendering errors, anybody has a solution?
@kchaiprogramming6179
@kchaiprogramming6179 2 года назад
Looks like v7 of react-hook-form migrated from using refs.. you can just spread properties on register. You can see this here - react-hook-form.com/migrate-v6-to-v7/
@onlyamaras
@onlyamaras Год назад
@@kchaiprogramming6179 can you please provide the updated code for validationProps, I tried all the way but not able to get the right output.
Далее
Elden Ring DLC - ПОДОЖГЛО ПОПУ!
07:26
Просмотров 366 тыс.
БАССЕЙНЫ ПО ЦВЕТАМ ЧЕЛЛЕНДЖ !
38:20
Beautiful sport😍
00:20
Просмотров 201 тыс.
React + Styled-Components | Reusable FORM Component
33:46
How to Make Forms in Angular REUSABLE (Advanced, 2023)
21:10
Create Dynamic Form Fields in React
28:14
Просмотров 100 тыс.
React useContext() hook introduction 🧗‍♂️
11:37
Setup React Router With Material UI Navbar
10:38
Просмотров 33 тыс.
Every React Concept Explained in 12 Minutes
11:53
Просмотров 485 тыс.
Elden Ring DLC - ПОДОЖГЛО ПОПУ!
07:26
Просмотров 366 тыс.