It’s not even half over, and 2017 has already been a year for the record books for traditional retailers. Just not in the way they would like.
National brands like J.C. Penney (jcp), Macy’s (m), and Sears (shld) kicked off the year by reporting awful holiday season results—and then announcing hundreds of store closings. Big names from Ralph Lauren (rl) to Staples (spls) followed suit, bringing the number of national chains’ store closings to a whopping 2,770 as of mid-May. Credit Suisse in April forecast that 2017 would see the highest number of closures since the Great Recession.
Then there are the bankruptcies, including once-vibrant chains like the Limited, Payless ShoeSource, and RadioShack. As of early May, S&P Global Market Intelligence tallied a record 18 retail bankruptcies, already matching the total for all of 2016. The carnage is on full display in the new Fortune 500 list: Household names like Macy’s, Sears, and Kohl’s all took tumbles down the list, as did other struggling chains like GameStop (gme) (falling 19 spots, to 321) and Dillard’s (dds) (which fell 37, to 417).
Symptoms of an industry-wide meltdown? Well, not exactly. Retail industry spending in the first four months of the year rose 3.6% compared with the same period in 2016, according to Department of Commerce data. The National Retail Federation expects that growth to pick up even more this year, thanks to low unemployment and a strong stock market.
But the way consumers spend has changed, perhaps irrevocably. And for stores that can’t adapt, there’s likely to be more pain ahead.
One of the biggest problems is shoppers’ discount addiction. The rise of Amazon (amzn) and of smartphones as shopping tools has pitted retailers against one another in a never-ending price war and put unbearable pressure on the least capable outlets.
The shift online has also meant less need for America’s sprawling malls and megastores. The U.S. has almost twice the retail square footage per capita of Europe, creating unsustainable oceans of store space. Just as bad? Many retailers’ supply chains are out of date, leaving them unable to keep up with consumers’ fast-changing and localized tastes.
A closer look at the chaos, however, will show that the companies hurting worst have a lot in common: A disproportionate amount of the suffering has afflicted apparel chains and department stores, many of which are selling undifferentiated products (basic T-shirts and jeans for everyone!). Chains that were scooped up during the recession by private equity firms, and loaded with crippling debt loads, were also hard hit. (Looking at you, Neiman Marcus.) It’s difficult for these companies to pay interest expenses, let alone invest in e-commerce or improve their stores.
But despite the dour headlines, some retailers are doing quite well—Walmart, Home Depot (hd), Costco (cost), T.J. Maxx (tjx), and Best Buy (bby) among them. These companies have evolved with consumers, remaking their stores, while creating robust e-commerce platforms. Walmart (wmt), for instance, offers discounts on online orders if they’re picked up in-store—encouraging “add-on” shopping. And Best Buy is reinventing itself as a place to get expert advice on smart homes and more sophisticated services.
Make no mistake, many large national chains face grim futures. But look beyond clothing chains and department stores and you’ll see a pretty healthy industry. What seems like a retail-pocalypse is really a shift in where and how consumers shop. “Retail has gone through periods of creative destruction before,” says Joel Bines, a managing director at consulting firm AlixPartners. In the end, the companies left standing may emerge stronger than ever.
A version of this article appears in the June 15, 2017 issue of Fortune.