Even some of the strongest of companies haven't escaped the market downturn. The Dow Jones Industrial Average slipped into a bear market earlier this week. That may not exactly put you in the mood to invest.

But before you decide to turn your back on the market, consider this. Market downturns are painful, but they're temporary. And companies with solid long-term prospects will go on to grow and thrive down the road. You could wait and buy them once their prices soar. Or you could focus on this long-term view and buy them today for a steal. Let's take a look at two stocks that are too cheap to ignore.

1. Home Depot

Home Depot (HD -1.21%) is holding up pretty well considering challenges facing retailers today. The company isn't immune to inflation and supply chain problems. But it's been able to manage these issues and grow.

On the second-quarter earnings call, Home Depot said it's managed to offset rising costs. And the company has invested in new supply chain facilities. At the same time, demand for home improvement projects remains strong.

All of this resulted in solid earnings for Home Depot. The company reported its highest quarterly profit and sales ever. This follows a long track record of profit and revenue growth. 

HD Net Income (Annual) Chart

HD Net Income (Annual) data by YCharts

I'm optimistic Home Depot can keep its growth going. The company's feedback from professional clients is a good barometer. These clients say their backlog of projects is strong.

It's also important to note that Home Depot's digital business and use of its mobile app are growing. And the company continues to invest in digital. This also is positive for the long-term picture as more and more consumers are turning to shopping online.

Home Depot shares have dropped 35% so far this year -- in spite of the company's resilience. This leaves them trading at less than 17 times forward earnings estimates. That's compared to more than 25 earlier this year. This is a bargain considering Home Depot's current earnings and future prospects.

2. Nike

Nike (NKE 0.28%) shares have declined 42% this year. Like retailers in general, the seller of athletic gear is facing higher costs and supply chain issues. Nike also may struggle as the stronger dollar reduces the value of its sales abroad. These elements mean Nike's troubles may not be over.

But here's the good news. Today's challenges are temporary. And Nike has what it takes to manage them -- and thrive over the long term.

First of all, Nike has brand strength. The company sponsors sports champions such as tennis star Serena Williams. And its Jordan brand is going strong -- nearly 20 years after basketball legend Michael Jordan retired. Last fiscal year was the Jordan brand's best year ever, the company said. 

Second, Nike has been building out its digital presence and direct connection with consumers over the past few years. It's limited retail partnerships and instead focuses on sales through its shops and online. It's also serving its fans with customized offers and special events -- like online drops of new sneakers.

The strategy is working. Today, Nike's digital business has doubled from its pre-pandemic size. It's brought in $10 billion in revenue. And it accounts for 24% of total Nike brand revenue. Importantly, digital is leading to more repeat buying and higher order value.

In the fiscal year ending May 31, Nike increased its gross margin by 120 basis points to 46%. And a lot of that was thanks to its direct sales to shoppers.

Nike trades at 25 times forward earnings estimates. That's down from more than 40 earlier this year. Of course, as I mentioned above, Nike may not rebound overnight. And it's impossible to time your purchase of the shares to their absolute lowest. But today represents a very reasonable time to get in on this promising long-term story.