The political ads warned that illegal immigrants were dashing, by the millions, over the Mexican border, racing to claim taxpayer-funded public services in California.

“They keep coming,” the announcer intoned over grainy aerial footage and a thrumming bass line. When viewed on YouTube today, these ads hardly seem the stuff of multicultural California as we know it.

In 1994, though, that message helped lift California’s governor, the Republican Pete Wilson, to re-election. That same year, voters adopted a referendum, Proposition 187, denying state services to undocumented immigrants, including public education and health care.

California is often held up as a harbinger of the demographics — and, Democrats hope, the politics — of the nation to come. Mr. Wilson’s bet against immigration is thought to have hurt Republicans in the long run in the state. But in the dawn of the Trump era, the state is also a cautionary tale of what happens during the tumultuous years when that change is occurring rapidly.