IN AN election that left Republicans in charge of the presidency, Congress, and many state governments, California shines like a ray of hope for Democrats. On the morning of November 9th, the state was even bluer than it was the day before. With 70% of the vote counted, Hillary Clinton was leading president-elect Donald Trump by 61.5% to 33%; in 2012, Barack Obama had 60% against Mitt Romney’s 37%. Long-time Republican strongholds, like mostly exurban Orange Country, voted for Mrs Clinton. Several districts are yet to be counted, but Democrats in the state assembly were on the verge of a two-thirds supermajority. Some inland and rural counties voted Republican, but California's ample population of coastal liberals and its many Hispanics—the state's largest single ethnic bloc—were firmly against Mr Trump. The heads of the two state legislatures put out a statement vowing to “lead the resistance to any effort that would shred our social fabric or our constitution.” They had woken up, the statement said, feeling like “strangers in a foreign land.”

Mrs Clinton's victory in the popular vote suggests that California may be a better distillation of America than the so-called “heartland.” Demographically, the state is still an outlier—non-Hispanic whites make up 64% of the national population; in California, whites constitute only 38%. But there is little question that America is moving in California's direction. Moderate California Republicans had long gritted their teeth at Mr Trump's populist election strategy, particularly his threats to deport illegal immigrants and his reference to “Mexican rapists,” fearing that the business mogul would turn them into a white identity party. They have had bitter experience of immigration politics. In 1994, California passed the Proposition 187 ballot initiative denying government services to illegal immigrants. Republicans hoped it would be a wedge issue, and it was one—but not to their advantage. Hispanics registered to vote, and voted Democrat. Republicans held just over two-fifths of the state's Congressional seats when Proposition 187 was passed. After this election, it will be around a quarter.

So will America’s growing population of Hispanics have a similar effect nationwide, tipping elections firmly into the laps of the Democrats and eventually overwhelming the Republicans' advantages in the Electoral College? This will depend primarily on whether the Democrats can continue to mobilise and energize Hispanics, and whether Republicans can shed a particularly toxic brand of immigration politics that appears to be playing into the Democrats' hands.

The candidacy of Mr Trump would seem to be a good test of this theory. Many pollsters anticipated a “Trump effect,” pushing Hispanic voters toward the Democrats. Some prominent Hispanic Republicans claim that the national exit poll commissioned by major media outlets shows that this supposed effect was absent or much weaker than expected: Mrs Clinton won the Hispanic vote by only 65 to 29%, the poll shows, which means that Mr Trump improved on Mitt Romney's standings from four years ago. Indeed, there's no particular reason why Hispanics should vote along ethnic lines. Many Californians, in particular, have deep roots in America, and may chafe at the crowded emergency rooms, long lines in government offices, and other ills which they blame on illegal immigrants from Mexico or Central America. Others are pro-life, or have a small business owner's aversion to taxes and regulation, or are drawn to Mr Trump's plain-spoken speaking style.

But others, notably the polling firm Latino Decisions, say that the exit poll was just bad data. Its pre-election polls showed Mrs Clinton winning Hispanics by 79% to 18%. Indeed, it is hard to square the exit poll's findings with the actual results from November 9th. Mrs Clinton did well across the West, winning not just California and Nevada but slashing the Republican margin of victory in formerly deep-red Texas and Arizona. Ultimately Hispanic turnout was offset by apathy among left-leaning voters and Mr Trump's popularity with the white working class—but if those don't hold in future elections, the prospects for the Republicans would appear to be bleak.

The key question then becomes whether Republicans can abandon an electoral strategy that would seem to be so toxic in the long-term. Mr Trump's proposed wall across the Mexican border is probably not itself a vote-killer. If he begins mass deportations, or cancels a programme which grants residency to immigrants who arrived as children, that will impact millions of lives—many citizens have an undocumented immigrant in the family, and many more know one. But most harmful of all is the way that populist Republican candidates handle the party’s messaging over immigration. If immigration was framed as a border security issue, or a question of government services, that might not antagonise Hispanic voters. But populists like Mr Trump have found that the base responds best when immigration is framed as a wave of “rapists” and other criminals. California's Republican leaders and donors would probably prefer to see less abrasive candidates on the ballot, but they tend to lose in primaries.

Complacency seems to have played a part in Mrs Clinton's loss, and California Democrats would probably be ill-advised to treat Hispanics as single-issue voters. There's no guarantee that immigration will be as prominent a campaign issue in the future as it has been in 2016, nor that Hispanic voters will respond in the same way. And the exit polls may indeed be right. Nonetheless, Californian Democrats who look at the rest of the country and think they see a “foreign land” should take comfort: most of it is more like their state than it is like Mr Trump's base, and it is getting ever more so.