I always use ant design with react hooks but the old code is written in react classes and it uses state variable and on page load state variable value changes as API respons