WEBVTT

00:00.120 --> 00:01.720
So hi everyone.

00:02.200 --> 00:07.520
In this video let's continue with the remove method okay.

00:07.920 --> 00:14.120
And inside remove method we have uh if this is the parent okay.

00:14.160 --> 00:21.560
Actually this is a little bit tricky if you read because if the parent right here is known okay.

00:21.600 --> 00:25.280
For that reason we should check right here.

00:26.280 --> 00:26.800
Okay.

00:27.480 --> 00:28.480
Let me comment.

00:28.680 --> 00:34.760
If this parent we will remove entire children okay.

00:34.960 --> 00:36.200
That's what we need to do.

00:40.400 --> 00:42.480
Well how we can emit event.

00:42.920 --> 00:47.600
Let's say we will call emit.

00:48.280 --> 00:48.720
Right.

00:49.040 --> 00:49.520
Sorry.

00:50.640 --> 00:50.800
Dot.

00:50.840 --> 00:51.520
Handle.

00:53.240 --> 00:53.960
Command.

00:55.280 --> 00:56.000
Remove.

00:59.520 --> 01:00.040
Follow.

01:00.040 --> 01:06.740
We need to move the id do the commentary over here and what we need to do more.

01:07.260 --> 01:13.980
Because if you only send with the only item, we can only.

01:17.020 --> 01:18.940
Remove the root level.

01:19.580 --> 01:19.940
Okay.

01:19.980 --> 01:21.860
We cannot check right here.

01:22.580 --> 01:26.220
So for that reason in this case we need to check one more thing.

01:26.260 --> 01:30.540
We need to send entire command pattern over here.

01:30.940 --> 01:31.460
Okay.

01:31.860 --> 01:33.060
And enforcement.

01:33.380 --> 01:34.660
We will check if.

01:36.700 --> 01:40.900
The command right here has a pattern.

01:42.140 --> 01:49.500
We need to override entire array into the empty array from the stack of react.

01:49.700 --> 01:50.220
Right.

01:50.660 --> 01:57.060
It means right here we need to remove entire replies.

01:57.100 --> 01:57.940
Right here.

01:58.300 --> 01:58.820
Okay.

01:59.180 --> 02:00.460
That's what we need to do.

02:01.740 --> 02:03.000
Let's create this.

02:05.640 --> 02:06.240
Command.

02:08.280 --> 02:09.440
And run away.

02:19.720 --> 02:24.840
And I will send command array and current array.

02:25.440 --> 02:25.800
Okay.

02:25.840 --> 02:26.760
That's what I want.

02:27.920 --> 02:29.760
And that will be enough.

02:30.960 --> 02:34.320
Right here we switch to screen.

02:35.160 --> 02:35.640
Right.

02:37.680 --> 02:40.440
Here we should put the question mark.

02:41.720 --> 02:45.880
And this thing can can only fly.

02:46.120 --> 02:46.680
Right.

02:47.440 --> 02:55.280
So for that reason we need to add here screen or 25.

02:58.360 --> 03:00.080
And that will be enough.

03:02.740 --> 03:07.060
Or you can convert it into new if you want.

03:07.340 --> 03:08.460
For example right here.

03:08.780 --> 03:09.300
Screen.

03:09.340 --> 03:10.420
Ah, no.

03:10.820 --> 03:13.540
I think the nodes is much better than.

03:15.940 --> 03:18.540
It much better than that would define it.

03:18.540 --> 03:23.180
Meanwhile, here we only need to check if we have a parent.

03:23.580 --> 03:33.820
We will go to the command dot pattern dot underscore a street or if not, we will return.

03:33.860 --> 03:34.140
No.

03:34.140 --> 03:34.780
Over here.

03:38.140 --> 03:38.580
Okay.

03:38.580 --> 03:40.740
This we will fix the script error.

03:41.420 --> 03:48.580
So that is not how we can handle the command real time.

03:48.620 --> 03:50.420
Let me remove the sum total.

03:55.380 --> 03:55.860
Okay.

03:55.900 --> 03:58.900
So that is right.

03:59.220 --> 04:01.460
And that's for the video.

04:01.460 --> 04:04.220
So I will see you in the next one.
