All right, so welcome back again. So in this particular session, we try to see how to work with click groups, right. So click groups allows you to group different commands or different functions under one particular period command. So in our case, we're going to have a period command. And then we wouldn't be having children or child comments or sub commands, right. So the basic idea so now this, just I'm just going to create my face, simple project to reverse a string to doesn't have to be reversed.
Then this is going to be to reverse a string. So for this reverse it then we go to another function to capitalize on to do the same thing as we did above and then of course capitalize it. Perfect. So that's something because you have done so now let's see How to work with click groups. So the basic idea that first off, we're going to bring the data here, click, but group, right in the previous one could have been clicked or combined. But now because you are grouping both their events in a capitalized under the me, it's no more going to be collected command to it, because if it does cool, then you're going to make sure that we link all these things under our periods Come on too hard, we do that through the simplest we just do it at me.
But command. So this mean, here refers to this particular manufacturing, thank you, this one was period. This is also going to be called period, right? And then we're going to change this one to one to two, pay, period. That's the basic idea behind it. So let's go back to using the main pivot to Who First of all, group this reverse under this particular command.
So let's try this see. So I'll come back here, and I run it by country, then our groups here like that. So we said, Now reverse is part of our commands. Very, very easy. So this is very, very useful in case you are building many apps, if you understand can do a lot of things. Let's apply the same thing to our capitalize it is add an argument which is going to be click with argument.
The argument we pass in the car test argument, right? To try to reverse a particular test. Then how do we best test you the simplest form is to click the taco, not passing my test. And it displays it right there's going to be just under one, right very simple. If it administrators simply for the capitalized to click cool. They're not passing the test.
Good. So we have to do something very simple. So we have to pass in our test here to test for argument to add arguments here to click that argument, then we'll just go with the test here, then a philosophy that you're going to be supplying the test. So let's see, let's check the help. If you check the hook, see that we have our capitalise command, we have our base command. So let's run it and see.
So goobie, reverse does help going to see how to use it right? So we take the reverse the ocean net test, right, which is an argument, I can now come back to this place. Let's apply this like just switch to reverse just for us very, very interested. Again, if you thought to capitalize it, I can just come to the same thing here. Good capitalized cup. Place, then it's going to capitalize the interest for surgery.
The big idea about how to With click group so the basic idea is that you face core group on top of your main function, then use the name to bring click the command command on this. This is the basic idea behind working with click groups. So thank you for watching and see you next session. Stay blessed.