I tossed food in the fridge, washed my travel mug in the sink, plopped on the sofa to page through a magazine and finally tested the bed, the ultimate barometer of any overnight accommodation. It was cushy with just the right amount of underlying firmness. I'd sleep well — plus be well-fed, thanks to the microwave, stovetop and dishwasher.

I could expect a gleaming stainless-steel kitchen from the homes I've rented through Airbnb. But this time I hadn't rented an apartment or home. I'd checked into a $120-per-night hotel near a shopping mall in suburban West Des Moines, Iowa, for a weekend soccer tournament.

The homey touches surprised me, but they shouldn't have. As Airbnb, HomeAway, VRBO and other short-term home-sharing companies lure vacationers with kitchens, backyards and the chance to mingle with locals, hotels are competing with amenities of their own.

Some, like Marriott's Element brand, bring a home kitchen to your hotel room. Others are cooking up perks that a single home or apartment never could, such as fresh-baked cookies all day or performances by local musicians in inviting communal spaces.

While most vacationers check into hotels, many are opting instead to rent part of or an entire home. Research firm Skift reported last year that home-rental earnings globally reached $82.9 billion in 2017. That's less than one-sixth of the hotel industry's $512.3 billion take. But in a sign that home-sharing is becoming a force, Skift predicts that such rentals will grow to $132.5 billion by 2022.

HomeAway, launched in 2004, lists more than 2 million houses, castles, cabins and other lodging options worldwide, as does VRBO, which HomeAway owns (Expedia is the parent company of both). Since its start in 2008, Airbnb has grown to include 5 million listings, ranging from a bedroom in someone's apartment to entire mansions.

Lure of the local

I opted for one of those Airbnb listings for the first time when I stayed in Rome two years ago. I shifted from a hotel for one main reason: My family would be joined by a friend who needed his own bedroom, so I wanted a three-bedroom apartment with a living room where we could comfortably converge.

My search had only just begun when I discerned another advantage: price. For less than the cost of two hotel rooms, we landed in a penthouse apartment in a beautiful building with a wraparound balcony.

In Rome, we discovered that our apartment rental also connected us to the neighborhood. The doorman welcomed us like longtime residents whenever we returned, worn out from a day of sightseeing. I shopped at the nearby corner store, where I grabbed sparkling water, delicious sandwiches, salads and cookies for dining on the apartment balcony. Since we were in a residential neighborhood not frequented by tourists, no one in the store spoke English. With my halting Italian, I eventually conveyed what I needed. By my third visit, I was greeted like a regular, albeit one who required patience.

My husband set off one morning to run along the Tiber with our host's husband and his trainer. He got in his miles — and an unexpected tour of the city from Romans.

Hotels are fostering local vibes, too, recognizing that modern travelers relish an authentic sense of place. At Ace Hotels, which started in Seattle, works by local artists hang on the walls. Some nights, the communal spaces host poetry slams or gigs by hometown acts. Every room at the Hotel Donaldson in Fargo features a different regional artist, and the rooftop is planted with prairie grasses. At the two Arlo Hotels in Manhattan, the rooms are small, the prices are low and the focus is on places for guests to be social, including lobby bars, libraries, restaurants and rooftops. Special events bring in Manhattanites; the SoHo location has regular movie nights, and its NoMad (Madison Square North) location recently hosted a T-shirt embroidery "craft jam."

Social graces

And those communal spaces? They're getting a whole lot nicer — an enticing reason to hang at a hotel, not squirrel away in a rental home.

At lively cocktail bars in hotels across the country — think Hewing Hotel in Minneapolis, the Intercontinental in Miami, the Curtis in Denver, the Hotel Peter & Paul in New Orleans — city residents mingle with visitors in hip spaces that ooze local culture.

The lobby of the Element West Des Moines has a sunken seating space with mod chairs, expansive sofas and communal work tables. (Element calls it a "living room.") Beyond the lobby's glass wall, a giant patio beckons with several grills, dining tables, a hot tub and a fire pit. Near the check-in counter, a large area behind fencing often holds rescue dogs for guests to walk — or bring home. The bar area serves a fresh fruit-filled breakfast and on weeknights, complimentary wine and beer.

Aloft Hotels, with 100 locations, regularly hosts Live at Aloft, concerts by local artists in its lobbies-turned-performance spaces. Pool tables provide a way to carry on the party when the music stops.

On my way to check in at 21 Broad, a boutique hotel on Massachusetts' Nantucket Island, I passed a woman reading a newspaper below a mod bubble light in a small, quiet sitting room. In the larger room next door, the manager greeted me behind a counter in the corner. A couple contemplated which album to spin on the turntable, a group of women huddled in a seating area, and I nibbled a chocolate chip cookie. The hotel turns them out all day.

It was exactly the kind of sleek, well-designed hangout space that hotels are getting adept at creating — like an Airbnb living room, only perhaps bigger and better.

The next day, I took advantage of the other benefits of a hotel.

I rolled out of bed knowing that housekeeping would tidy it later. Breakfast was waiting when I wandered into the lobby; options included a carrot muffin, a chia-seed compote and a plate of fruit and yogurt topped with a whale tail-shaped biscuit. Later, I headed to the ocean carrying a beach towel provided by 21 Broad. And while I was out bobbing in the waves, my bags were safely tucked away at the front desk — staffed 24 hours a day — since I'd already checked out.

Luggage drops, easy check-ins, concierges, safety features like fire sprinklers and a uniform standard of cleanliness and style: These certainties will keep visitors overnighting at hotels. And the warmth and local touches inspired by the competition from home-sharing have only improved the hotel experience.

Which is better? That depends upon the traveler, his or her expectations and the destination. I like the comfort and ease of a hotel. And I like the space and uniqueness of home rentals. On an upcoming trip to Italy, in fact, I'm splitting the difference — Airbnb in Rome, hotel in Florence — and looking forward to both.