R.R. Donnelley Interview Question

How do we use state in react