In the late 1990s and early 2000s, that's what happened. Lawmakers were quick to expand state spending amid a booming tech economy and the corporate IPOs that went with it, only to see those gains vanish when the bubble burst and ushered in a recession and a $14 billion budget gap.

"From a state budget perspective, major IPOs are a bit like rainbows. They are lovely to watch but they don't last for very long," said H.D. Palmer, deputy director for external affairs at the California Department of Finance, which manages Gov. Gavin Newsom's budget plans.

It could be difficult for lawmakers to keep their hands off any extra money because, this year, California has so much of it.

The state has a projected $21 billion surplus in the first year of Newsom's administration, and that's without factoring in money from the IPO wave. Former Gov. Jerry Brown began his administration with a deficit, and he frequently clashed with fellow Democrats who wanted to spend more while he wanted to save it.

As he left office, with the California economy humming, Brown warned that Newsom might have a tough time convincing the Legislature not to drastically increase spending.

Newsom did propose new recurring spending, including proposals to improve drinking water in rural areas and to bolster the state's 911 emergency call system. But he proposed new taxes to pay for them instead of relying on the state surplus.

Newsom's budget proposal will be revised next month based on revenue collections. Ting said it likely will not include revenue from the IPOs.

David Wolfe is skeptical. The legislative director of the Howard Jarvis Taxpayers Association noted California has historically had trouble saving money during the good years.

"You see these surpluses out there and it's deja vu all over again," said Wolfe, whose organization favors limited taxation. "Are we going to spend this money on one-time programs? Given California's history, I think the likelihood of that is doubtful."

IPO windfalls are unusual in the world of state budgets, but they have become common in California, a state with nearly 40 million people that boasts the fifth-largest economy in the world. The state budget relies heavily on the wealthiest earners; in 2017, the top 1% were responsible for more than 47% of the state's income tax collections.

Most of that comes in capital gains, which in California are taxed the same as income and are heavily dependent on the stock market. California got nearly $11 billion from capital gains taxes in 2007, only to see it drop to $4.6 billion in 2008 and $2.3 billion in 2009 during the Great Recession.

This budget year, state officials expect to get $15.2 billion from capital gains taxes, the largest amount ever. And that's without adding in the expected jackpot from the major IPOs.

Companies, including ride-service startup Lyft and social media website Pinterest, already have gone public, but it could be months before the state starts seeing the tax revenue from them. Uber, corporate chat room provider Slack, home rental site Airbnb and data software company Palantir are poised to go public later this year.

Of those, Uber is the behemoth. Experts predict the company could be valued as much as $91 billion, a decline from initial estimates but still near Facebook's $100 billion initial public offering in 2012 that netted California $1.3 billion in tax revenue.

Predicting how much money California will get from these IPOs is difficult. Facebook's 2012 IPO was unusual in that most of the state's tax gains came from one person: CEO and founder Mark Zuckerberg, whose wealth state officials could easily guess based on the company's regulatory filings.

This year, more companies going public involving more investors makes it harder to forecast.