What happened

Neighborhood-focused social media company Nextdoor (KIND) reported its first-quarter earnings on Tuesday, and the stock is rising on Wednesday morning. As of 11 a.m. ET, Nextdoor had rallied by 18% for the day, handily outperforming the broader market.

So what

It's been a challenging period for businesses that depend on advertising revenue like most social media companies, and Nextdoor hasn't been an exception. But the company just reported first-quarter results that took the market by surprise. For one thing, Nextdoor generated $49.8 million in revenue, and although it represents a slight year-over-year decline, it was about 8% more than analysts had been expecting.

Furthermore, the company posted an adjusted EBITDA loss of $21.7 million but this was also significantly better than expected.

What's more, although the advertising environment is difficult, Nextdoor is doing a great job of growing its user base. It had 42.4 million active users in the first quarter, 16% more than a year ago. User growth like this should position the company for excellent revenue growth when conditions improve in the advertising market. Management credited its investments in artificial intelligence technology and the targeted user experiences it creates for its growth.

Now what

Nextdoor produced very encouraging results and ended the quarter with $575 million in cash and investments, giving the company plenty of runway to let its growth story play out. Investors seem more confident about Nextdoor's path to profitability after these results, and it's not hard to see why.