JD.com (JD -3.18%) recently lost its largest shareholder, Walmart (WMT -1.22%) when the U.S. retail giant sold all its holdings, triggering a drop in share price.

Walmart says it's reallocating its money to its Walmart China and Sam's Club locations.

Should you follow Walmart's lead and invest elsewhere, or are there reasons to stay with JD.com for the long term?

Where does JD.com rank in Chinese e-commerce?

JD.com successfully competes against several well-established Chinese e-commerce rivals. For 2023, Statista lists JD.com fourth behind Pinduoduo (PDD -1.44%), Taobao, and Tmall in gross market value.

You may not have heard of Pinduoduo. It uses a team-purchase concept where friends can ban together to qualify for group discounts on groceries, everyday household items, and appliances.

You may have shopped on Alibaba's wholesale website. However, its the Alibaba Group's (BABA -1.19%) subsidiaries, Taobao and Tmall, which play a more significant role in the Chinese online market.

Taobao is a consumer-to-consumer site modeled after eBay while Tmall focuses on business-to-consumer transactions. But how does JD.com carve out its place in this e-commerce environment?

What are JD.com's competitive advantages?

JD.com distinguishes itself with its background in technology. It's the go-to Chinese site for computers and electronics. Like Amazon, it aims to offer the lowest available prices by purchasing in bulk from third parties, warehousing the goods, then selling the items at reduced prices.

The company's early days focused exclusively on computer and electronic sales, but according to its 2024 first-quarter earnings call, JD.com is increasing its sales of foodstuffs, household items, automotive supplies, and backyard goods. CEO Sandy Xu said these categories are among the company's fastest-expanding segments.

China's e-commerce market is so huge that Xu sees plenty of room for growth. She stated online companies have tapped into only around 30% of the market which includes more than 300 domestic cities each with a population above one million.

Similar to Amazon, JD.com likes to woo customers with its customer service. Recent improvements to the customer experience include lowering the bar for free shipping and offering free customer pickups for returned items.

The company also aggressively pursues faster and more efficient ways to deliver packages. For example, not only does it boast fast delivery within 24 hours, but it maintains a large fleet of drones for delivery in China's remote areas.

The company is also enjoying success with a nationwide appliance trade-in program involving the cooperation of more than 100 brands. The company reports that since 2023, 16 million people have used the JD.com platform to trade old appliances for new ones. The arrangement includes doorstep pickup and delivery services for people even in the isolated mountains of Tibet.

Is JD.com's stock priced to sell?

Walmart didn't unload its JD.com stock because the company wasn't growing. It simply wasn't growing fast enough for Walmart, expecting to see speedier returns from its Sam's Club warehouses.

Actually, JD.com has shown steady, albeit small, revenue growth since 2022. According to its second-quarter report, revenue grew by another 1.2%. That compares well against the Alibaba Group whose second-quarter revenue was –2%.

News of Walmart's sell-off gave JD.com stock a Wednesday opening price of $26.04, far from its 52-week high of $35.69. But JD.com management is proactive about preventing a massive devaluation of its shares. Earlier this year the company approved a $3 billion stock repurchase plan to stabilize its share price.

What is the geopolitical risk?

Investors in Chinese-based companies risk suffering the consequences of political tensions between China and the U.S. Strained relations have resulted in tightening trade policies.

Lately, there have been calls among law enforcement officials and legislators to plug a loophole that allows for inexpensive shipping into the U.S. The so-called de minimis exception permits packages worth less than $800 to cross the border duty-free. Those calling for change say the rule allows Chinese companies to skirt protective tariffs.

Worsening trade relations could hamper JD.com's attempts to expand operations in the U.S. Trade restrictions could also deepen general economic worries in China, causing consumers to rethink unnecessary purchases.

Should you take a chance on JD.com?

The online market has slowed for everyone, not just JD.com. Meanwhile, JD.com has secured its place within the Chinese e-commerce market by establishing its reputation in computers and electronics.

The company seems to be navigating this period reasonably well with consistently modest revenue gains. And it helps that management appears intent on keeping stock prices from plummeting by repurchasing when necessary.

The geopolitical climate always poses a risk, but overall, JD.com looks to remain competitive and deliver steady, if unspectacular, wins for long-term investors.