As Republicans nurse their wounds from last week's election setbacks, they’re trying to learn the right lessons from defeat, studying outcomes in various House and Senate races, and pondering how best to position themselves when it comes to the politics of immigration.

Mitt Romney’s poor performance among Latino voters in states like Nevada and Colorado helped undermine his chances of victory in those battlegrounds. As a result, some Republicans are drawing the lesson that their party must find a message and a candidate to ensure they do not end up, as Romney did in Nevada, winning only about one-in-four Latino voters.

Romney lost that state by 66,000 votes, or 6.6 percentage points.

“The handwriting is on the wall,” said Republican pollster Whit Ayres, the co-founder of a group called "Resurgent Republic."

“Until Republican candidates figure out how to perform better among non-white voters, especially Hispanics and Asians, Republican presidential contenders will have an extraordinarily difficult time winning presidential elections from this point forward,” he said.

Warning of a demographic apocalypse for the GOP was Texas Senator-elect Ted Cruz who told The New Yorker, “If Republicans do not do better in the Hispanic community, in a few short years Republicans will no longer be the majority party in our state.”

MSNBC's Thomas Roberts talks to former Pennsylvania Governor Ed Rendell and former New Hampshire Senator Judd Gregg, co-chair of the "Fix the Debt" campaign.

And since New York and California supply such a huge and utterly dependable source of electoral votes for the Democrats, if Texas joined them in going Democratic in presidential races, which hasn't happened since 1976, then, Cruz said, “The Republican Party would cease to exist.”

But in Nevada, Republican incumbent Dean Heller won his Senate race even as Romney was losing the state – and among Latino voters, Heller won just about what Romney won: about one quarter of them.

However, there were significant differences between the Senate race and the presidential race in Nevada: one was the weakness of Democratic candidate Rep. Shelley Berkley among black voters who accounted for nearly one out of ten voters in in Nevada.

While President Barack Obama carried 92 percent of black voters, Berkley won only seven out of ten. Berkley also under-performed among women voters, getting 48 percent to Obama’s 57 percent, according to exit poll interviews.

Mark Wilson / Getty Images

Latinos and immigrants participate in a rally on immigration reform in front of the White House on Nov. 8, 2012 in Washington, D.C.

And among the three-fifths of the Nevada electorate who believe that most illegal immigrants working in the United States should be offered a chance to apply for legal status, Berkley lagged Obama’s performance by ten points, according to exit polls.

Nevada also has a “none of these candidates” line on the ballot and that option drew 4.5 percent of the voters in that Senate race but only 0.6 percent of those who voted in the presidential contest in Nevada.

In July, the House Ethics Committee announced that it was opening an investigation into whether Berkley had violated the "Code of Official Conduct" or any law by her alleged intervention on behalf of businesses in which her husband had a financial interest. That fact may explain why Berkley lagged Obama.

Independent American Party candidate David Lory VanDerBeek, a small government conservative, also won nearly 5 percent of the Nevada vote, but if anything, his votes came from Heller and not from Berkley.

Now as the Senate looks toward the legislative agenda for 2013, newly elected Republican senators such as Cruz and Senator-elect Jeff Flake of Arizona, as well as returning GOP senators such as Heller, must decide whether to support the Democrats’ Dream Act which would give legal status to young non-citizens brought to the United States illegally by their parents.

Flake told NPR last week that Republicans “need to deal with this issue in ways different than we've approached it in the past ... We need to deal with the very real problem presented by the Dreamers – those who are here through no fault of their own. I think the Republicans can get out front on that issue and offer a long-term solution, not just the short-term solution that's been put forward by the president.”

But an accommodating policy toward legalizing illegal immigrants would raise strategic questions for Republicans: last Tuesday in Nevada, Arizona, and other states, Latino voters supported Obama and other Democratic candidates by a ratio of nearly three-to-one.

If adding millions of younger Latino residents to the legal resident population (and eventually to the citizen voting population) means adding millions more Democrats, then how is that a winning strategy for Republicans?

“Who’s to say they’re going to be Democrats then?” Ayres asked, referring to the potential pool of younger immigrants who might eventually gain citizenship if Congress enacts some version of the Dream Act. “They don’t want a handout or a guarantee, they want an opportunity. They’d like to keep more of what they earn; they’d like the opportunity to start businesses and an opportunity to start a family. A great many of those people have the work ethic and the entrepreneurial spirit and the family orientation to be good solid Republicans – if we stop the tone that suggests we don’t want them as part of our coalition.”

The last time the Dream Act was put to a vote, in 2010, only three Republican senators and only eight House Republicans voted for it. If Republicans who voted against the Dream Act just two years ago now reverse or trim their positions on immigration, is every vote GOP candidates might gain among Latino voters offset by a vote they’ll lose among those who oppose giving legal status to illegal immigrants?

Again Ayres has an answer to this. Referring to GOP voters who today oppose the Dream Act, he asked, “Who’s to say they’re single-issue voters? And who’s to say they aren’t capable of being persuaded by the likes of Marco Rubio?”

Rubio is the Republican senator from Florida, and a potential 2016 GOP presidential contender, who has proposed his own version of a legalization program for younger illegal immigrants, but one that is less lenient and expansive than the version Democrats offered in 2010.

One other puzzle Republicans will need to solve if they are to win more elections in 2014 and beyond is how to make smaller government appealing to more voters, or in other words, how to offer voters less in the way of tangible benefits.

But the reason that Republicans were successful in exploiting the Medicare issue during the 2010 midterms is not because they were making a smaller government/fewer benefits argument.

Instead, they were arguing that Obamacare would take away older Americans’ Medicare benefits, since the Affordable Care Act intends to squeeze hundreds of billions of dollars in more savings out of Medicare, partly to help pay for an expansion of Medicaid for poor people.

By a narrow majority in the national exit poll sample, and by a wider majority in states such as Arizona, voters last week agreed with the idea that “government is doing too many things better left to businesses and individuals.” That indicates that perhaps Romney’s message got through to voters on the failed federally subsidized energy firms such as Solyndra and A123 Systems.

In the short term, Flake, for one, is taking a wait-and-see approach toward Obamacare, the most visible symbol of bigger government.

CNBC's Eamon Javers talks about the upcoming meeting between President Barack Obama and Congressional leaders.

He thinks that parts of it will self-destruct. “There are parts of Obamacare that I think will probably fall of their own weight,” Flake told NPR.

Outright repeal isn’t in the cards, but Flake argued that once people see how expensive Obamacare mandates are for his state and others – and once people see employers refusing to hire more than 50 people for fear they’d have to comply with Obamacare mandates, then voters might see that “the Republican way will be the way to deal with it.”