React JS - Creating Forms from the State
In this video, we will see how to create a React form using the state. Usually, react forms are created from the state since the latter can be loaded directly from the server (creating changing forms), and since creating an array for our inputs allows us to create a map and then use one handler for changing inputs.
This video deals with simple forms that consist of text fields. We will load different input fields with different labels, placeholders, and numbers of rows. In the upcoming videos we will tackle forms that contain text fields and drop down lists, and even more complex forms that contain numerous types of inputs.
By the end of this video we will submit the form using axios and then redirect to another page, the same concept applies for other libraries or for "manual" http requests.
I am using material UI for React in this video. The same concept applies if you are using other libraries, if you're using the stock input fields, or if you have created your own components. Some keywords might vary (e.g.: placeholder, label...) from one library to another, just be careful to check the keywords.
00:00 Creating first input from the state
10:33 Loading other from elements from the state
14:00 Handling input changes - updating the state with the content inside the fields
19:17 Adding the submit button
22:47 Creating the submit method - sending data to the backend and showing a loading spinner
You can find the source code on https://github.com/judabne/react-dynamic-components . This isn't a complete project, it just holds the code for loading my components from arrays (https://youtu.be/tZiFGYYt-mI), adding transitions (https://youtu.be/sU1rMZV3p3A), and creating forms (https://youtu.be/S-3ovwwpthw).
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «React JS - Creating Forms from the State», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.