Taming the State in React