Wify interview question

Why do we use state variables in react ?