State has nothing to do with the DOM. State is a data feature of your application which is not the DOM. It sounds like you are stuck in some inescapable framework mindset. If you can escape framework insanity state is an easily solved problem and the DOM stops being scary.