React - Forms and Events

Developed with
QA

Contents

keyboard_tab
ReactJS
1
React Event forms
PREVIEW1m 17s

The course is part of this learning path

ReactJS: Zero to Hero
course-steps
14
certification
5
lab-steps
3
play-arrow
React Event forms
Overview
DifficultyBeginner
Duration7m
Students24

Description

This module looks at React Event Forms.  

Learning Objectives 

The objectives of this module are to provide you with an understanding of: 

  • React event forms  
  • React form components  
  • Form Submission 

Intended Audience  

This learning path is aimed at all who wish to learn how to use the ReactJS framework.  

Prerequisites

It is essential you understand the face of contemporary web development to attend this course. We insist upon JavaScript experience, along with good HTML and CSS skills. 

Feedback 

We welcome all feedback and suggestions - please contact us at qa.elearningadmin@qa.com to let us know what you think. 

Transcript

- [Instructor] Form management is done by event handling. So it's important that we understand how react works with any DOM style events little more before we delve into working with forms. In an earlier video, we said we could use any event that could be called on a DOM element in a react component. With some subtle syntactic differences, events used in JSX should be comelCased rather than in lowercase. So onclick becomes onClick, onmouseover becomes onMouseOver and so on. React will usually recognize the event in any case, but warnings will be given in the console. In JSX, you pass a function as the event handler rather than a string. So onclick with the function call to click handler as a string becomes onClick with a JSX expression. This is an arrow function that returns the call to click handler. You cannot make the handler function return false to prevent default behavior. You must explicitly use the preventDefault call in the handling function. And there is no need to ever call out event listener in react, you just provide the event and its handle callback when the element is initially rendered. We'll be using event handling with forms to trigger value changes in form submission as we go through the rest of this topic.

About the Author

Students1293
Labs8
Courses29
Learning paths5

An outstanding trainer in software development with more than 15 years experience as a Corporate and Apprentice Trainer, ICT Teacher and Head of Department, with a passion for technology and its uses. Continuing to develop existing and new skills and courses, primarily in web design using PHP, JavaScript, HTML, CSS and SQL but also OOP (Java), programming foundations (Using Python), DevOps (Git, CI/CD, etc) and Agile/Scrum. Practically minded, a quick learner and a problem solver with an attention to detail to ensure high quality outcomes.

Covered Topics