react2
react2
Management
and Events
IRFAN JAVED
M HUZAIFA ALI
TABLE OF CONTENTS
01 03
What is Events
State?
02 04
Handling The Using Events with
State Forms
01
What is State?
React State
Initialize useState:
The First Value “color” is the current State, The Second “setColor” is the
setter function.
Updating the State:
What Can The State Hold?
The useState Hook can be used to track of strings, numbers,
Boolean, arrays, objects or any combination of these.
A single Hook that Holds and object.
Updating Objects in State
03
Events
Events
Just like HTML DOM events, React can perform actions based on user
events.
React has the same events as HTML: click, change, mouseover etc.
Passing Arguments Into Events
04
Using Events With Forms
Adding Forms in React
Handling Forms
Submitting Forms
Multiple Input Fields
THANKS!