useState hook refactor

welcome to shbcf.ru