Two of them.. 1: What Paul said above (Thanks Paul, saved me a bunch of typing)
2: There is a special kind of inverter for RV's (And some other cases) that acts a lot like a UPS.. In fact the major difference between this unit and a UPS is that a UPS is designed to run things long enough for an emergency generator to take over or for you to shut down safely.. NOT for days on end. The inverter,, Days, weeks, months, years.. It does not much care.
One example of this is the Xantrex Prosine 2.0
This kind of inverter has a 120vac INPUT.. Just like a UPS.. It has a 120 VAC output. likewise. Where a UPS has an internal battery (usually) the inverter has 12 volt in/out lugs.
LIke the UPS if shore power fails.. CLICK, it's running on inverter power.
Have had lights go out while I was on line.. Never even blinked the switch-over was that fast.
Home is where I park it!