When data is being retrieved from state, we are getting an error mentioning state is not defined. Please solve the issue.