So hi everyone.
In this video let's continue with the remove method okay.
And inside remove method we have uh if this is the parent okay.
Actually this is a little bit tricky if you read because if the parent right here is known okay.
For that reason we should check right here.
Okay.
Let me comment.
If this parent we will remove entire children okay.
That's what we need to do.
Well how we can emit event.
Let's say we will call emit.
Right.
Sorry.
Dot.
Handle.
Command.
Remove.
Follow.
We need to move the id do the commentary over here and what we need to do more.
Because if you only send with the only item, we can only.
Remove the root level.
Okay.
We cannot check right here.
So for that reason in this case we need to check one more thing.
We need to send entire command pattern over here.
Okay.
And enforcement.
We will check if.
The command right here has a pattern.
We need to override entire array into the empty array from the stack of react.
Right.
It means right here we need to remove entire replies.
Right here.
Okay.
That's what we need to do.
Let's create this.
Command.
And run away.
And I will send command array and current array.
Okay.
That's what I want.
And that will be enough.
Right here we switch to screen.
Right.
Here we should put the question mark.
And this thing can can only fly.
Right.
So for that reason we need to add here screen or 25.
And that will be enough.
Or you can convert it into new if you want.
For example right here.
Screen.
Ah, no.
I think the nodes is much better than.
It much better than that would define it.
Meanwhile, here we only need to check if we have a parent.
We will go to the command dot pattern dot underscore a street or if not, we will return.
No.
Over here.
Okay.
This we will fix the script error.
So that is not how we can handle the command real time.
Let me remove the sum total.
Okay.
So that is right.
And that's for the video.
So I will see you in the next one.