4.3 working with state

Now we want to import unique pieces from the library react and we want to import a function here a function that is called usstate this is a function provided by the library and this function allows us to define values as a state the modification of its values should be reflected in the function calling to new This is a key difference from the variable that we use here. Below const expenditure item we will mark usestate you put brackets in you go add props Title now you know it well

and what we’re gonna do is behind usestate We’re going to add a const there you put pick up and in this hook you put title comma set title and between usestate set title you put the equal sign And so what we’re gonna do here is we’re gonna change. We’ll put set title and we’ll put update between parentheses like this like this this function will be updated. You can remove the let.title this one is very simple you just have to remove equal and it will be good and save you. I’ll see you in the next class.