title: how to do type validation of state in React class based component?
body: <p>I want to know how to do type validation of state in React class based component.
  I found example of typechecking using proptypes but I need solution for states.
  Thank you in advance</p>