Walmart (WMT  ) reported fourth quarter earnings on Thursday that came below Wall Street consensus expectations. However, the company remains optimistic towards the growth of its omnichannel retail strategy, with Walmart taking the recent momentum from the pandemic for its ecommerce business and investing with the goal of turning it profitable.

Shares fell over 6% on Thursday as market participants reacted to the big-box retailer's warning that it expects sales to slow from their fast growth momentum seen throughout the pandemic. This decline impacted exchange-traded funds (ETF) where Walmart holds large weightings like Consumer Staples Select SPDR Fund (XLP  ), Vanguard Consumer Staples ETF (VDC  ), and Fidelity MSCI Consumer Staples Index ETF (FSTA  ), with Walmart account for at least 9% of each respective funds.

Take Walmart for example. The company has benefitted from pandemic trends, with Americans buying more groceries, cleaning products, and other essentials at the retailer, especially online. In its latest quarter, Walmart saw its ecommerce sales in the United States increasing by 69%, building on the 79% gain in Q3 and 97% in Q2 as the company boosted its online business through services like curbside pickup and one-day home delivery.

Yet, the decelerating pace of the company's ecommerce growth rate signals that some issues lie ahead, especially as the U.S. rolls out multiple effective coronavirus vaccine and Americans begin to spend their budget on other things on other discretionary goods and services like dining out at a restaurant or seeing a movie.

Walmart is also under pressure to turn its ecommerce channel profitable, because even through its online push has been successful, it has required additional labor as employees have to pick and pack orders, turning brick-and-mortar stores into semi-warehouses. Walmart is looking to alleviate this cost issue through investments in technologies like automated fulfillment centers as the company bets that consumers will continue to purchase groceries and other essential goods online post-pandemic.

"Change in retail accelerated in 2020. The capabilities we've built in previous years put us ahead, and we're going to stay ahead," said Doug McMillon, Walmart President and CEO, in a press release. "Our business is strong, and we're making it even stronger with targeted investments to accelerate growth, including raises for 425,000 associates in frontline roles driving the customer experience."

"This is a time to be even more aggressive because of the opportunity we see in front of us," added McMillion. "The strategy, team and capabilities are in place. We have momentum with customers, and other financial position is strong."

Consumer staples stocks have been underperforming the S&P 500 (SPY  ) since their muted 2020 performance, with shares down over 2% for 2021 so far. Despite the decline, the sector has a lot of long-term potential for the investor that is looking for safe and secure companies that expected to grow at high single digits. It also has a good range of ETFs, that are set to benefit from Walmart's ecommerce push in the years to come.