There's precedence, but without Federal troops they're easy pickings for an intact Mexico. If Mexico wanted to continue the economic relationship as a client/customer, say - in exchange for El Paso, Texas would be fine. After a while.
California would literally implode without Federal aid. They can't even afford to bus convicts out to pick up litter on the side of US Hwy 101.
Disclaimer: I've lived in San Francisco for most of my life, and now live in Austin.