how to create state variables in function components in react