is this way of handling react states a bad idea? - Theo's Typesafe Cult