The only difference between the functional component and the class component at this point is instead of calling this. setState we use the function we created in the useState , in this case, setValue .
The only difference between the functional component and the class component at this point is instead of calling this. setState we use the function we created in the useState , in this case, setValue .