While the stock market hasn't performed particularly well in the past year, the good news is that finding shares of great companies to buy on the dip has become relatively easy. Sure, many of these corporations will continue to face near-term headwinds.

But for investors willing to stick through these issues -- and hold their shares for, say, the next 10 years -- the rewards may substantially outweigh the current pains. With that in mind, let's look at two companies that could deliver market-beating returns in the next decade: Roku (ROKU -0.19%) and Chegg (CHGG -3.28%).

1. Roku

The streaming industry is bigger than ever, and Roku is among the most prominent names in the game. The company has gained plenty of customers in the past few years thanks to the well-known trend of cord-cutting, which refers to people leaving traditional cable services in favor of other options, such as streaming. Roku generates revenue by selling its namesake devices and digital advertising, and operating system (OS) licensing.

In 2021, Roku's OS was the top-selling smart television (TV) OS in the U.S., a feat it also achieved in 2020.

Person watching videos on a smartphone.

Image source: Getty Images.

Several key metrics indicate just how successful Roku has become. Two of these are hours streamed and active accounts. That's because the more people it has in its network, and the more engaged they are, the more advertisers will seek this avenue to reach their target audience. In the fourth quarter, the company's streaming hours increased by 15% year over year to 19.5 billion.

Meanwhile, Roku's active accounts during the quarter came in at 60.1 million, 17% higher than the year-ago period. The company's total revenue for the quarter jumped by 33% year over year to $865.3 million. Roku's net income for the quarter decreased to $23.7 million, compared to the $67.3 million reported during the prior-year quarter.

One reason behind the decline in the company's bottom line was the supply chain issues that impacted sales of TVs that carry Roku's OS. According to the company, sales of these TVs fell below pre-pandemic levels. While its namesake devices continued to sell well, Roku sold them at a loss during the quarter, choosing not to pass on the higher costs of getting these devices to market to customers. The company expects these headwinds to persist this year.

Even with these obstacles, though, Roku's future looks bright. The streaming industry is still on an upward trajectory. According to some estimates, it will expand at a compound growth rate of 21% through 2030. Roku's CEO, Anthony Wood, expects the company to remain a leader in OS licensing. The company's players will likely remain popular as well, as advertisers increasingly turn to streaming platforms.

Consider that adults between the ages of 18 and 49 spent 45% of television time streaming in the fourth quarter. However, advertisers spent just 18% of their TV budgets on streaming. This disconnect strongly suggests that there are plenty of advertising dollars that will be redirected to Roku and other streaming giants in the coming years. Both the company and its shareholders will reap the benefit of this trend in the next 10 years. That's why Roku stock looks like a buy today.

2. Chegg

Chegg is a learning platform that helps students in various ways. The company provides solutions to homework questions and textbook problems, which students can access by subscribing to its Chegg services. These solutions are often prepared by subject matter experts, and that's one of the things that makes the platform so valuable for students. The more solutions there are -- and the more experts join the platform -- the more attractive it becomes to students.

On the other side of the equation, experts looking to make a buck by answering textbook questions online will increasingly seek to join the platform if more students are on it. This network effect will continue to work in Chegg's favor. In 2021, the company had 7.8 million Chegg services subscribers, representing an 18% year-over-year increase. Chegg's total revenue came in at $776.3 million, 20% higher than the previous fiscal year.

The company's net loss for the year shrunk to $1.5 million, compared to the net loss of $6.2 million recorded in 2020.

In the future, the company will rely on subscriber growth to drive revenue and eventually become consistently profitable. Fortunately, there seems to be plenty of whitespace to work with in this market. Chegg sees a global opportunity of 100 million students worldwide. The 7.8 million Chegg services subscribers it had last year seems pretty small in comparison. The company is taking several steps to take advantage of this opportunity, including a more aggressive international strategy that includes adding more subjects in local languages, among other things.

Although Chegg's stock suffered last year as its pandemic tailwind came to an end, the company's outlook for the future is bright. And considering how much shares have fallen in the past year, investors would be acquiring shares at a steep discount. Chegg looks like an excellent stock for those focused on the long game as analysts project growth estimates of 30% annually for the next five years.