1
00:00:00,210 --> 00:00:01,440
Welcome back.

2
00:00:01,470 --> 00:00:09,540
Before we get into code, let's have a look at some of the rules when it comes to handling events in

3
00:00:09,540 --> 00:00:10,350
React.

4
00:00:10,800 --> 00:00:16,050
There are three important rules that you should remember when handling events in React.

5
00:00:16,050 --> 00:00:24,420
And the first one is that React events are named using camel case than using the lower case.

6
00:00:25,050 --> 00:00:33,540
The next point is that you pass a function as the event handler rather than a string and we will demo

7
00:00:33,550 --> 00:00:34,050
that.

8
00:00:34,260 --> 00:00:41,400
Next one is you should never call such dates inside an event handler because we haven't talked about

9
00:00:41,400 --> 00:00:42,810
managing states using you.

10
00:00:42,840 --> 00:00:45,360
State Don't worry about this technical term here.

11
00:00:45,390 --> 00:00:49,530
We will postpone it and dive in details in the upcoming ones.

12
00:00:50,090 --> 00:00:54,690
The next one going to be the event handling function should be a pure function.

13
00:00:54,690 --> 00:01:01,680
I mean, meaning that this means that it should not modify the component state or make any API calls.

14
00:01:01,680 --> 00:01:03,750
So you talk about it very soon.

15
00:01:03,750 --> 00:01:07,560
So these are the common I mean, event handling rules.

16
00:01:07,560 --> 00:01:14,070
You need to bear in mind the next video we talk about some of the event types that we can use in React

17
00:01:14,070 --> 00:01:17,790
and then we move forward and demo more what you talk about.

