https://en.m.wikipedia.org/wiki/Posse_Comitatus_Act
The inflammatory tweet, when you read it without the emotional component, Trump is doing what he's allowed to do. He's offering the military if requested by the governor. That is really the key thing. As long as the state government is in place and functional the governor is in control.