Congressman Joe Crowley’s loss to Alexandria Ocasio-Cortez this past Tuesday brought back familiar memories to a situation I experienced in 2014 when my boss, then-Majority Leader Eric Cantor, unexpectedly and infamously, lost his primary race.

In the immediate aftermath, my sympathy was with Crowley’s staff who were surely suffering the same psychic shock that I once did. But they and the rest of the Democratic Party should understand that there are broader lessons that can be taken from this moment. Chief among them is to not overreact politically but also to heed the warning signs clearly evident in the outcome of the vote.

Failure to do so could affect the party for years to come, as it has for Republicans.

The two races have their similarities and their difference. Crowley was in line to be speaker, as was Cantor. But Crowley’s national presence was much less profound at the time of his defeat, whereas Cantor was already a national figure owing to his days leading the resistance against the economic and big government policies of the Obama administration. Crowley’s Democrats are also currently in the minority—merely planning for a future takeover—while Cantor’s Republicans already had control of the House.

The districts are also very, very different. National pundits tend to discount local party and voting dynamics that affect congressional and statewide races because viewing a campaign through the prism of national issues is far easier. I highly doubt that Crowley was unfocused on NY-14 just as it’s a common misconception that Cantor was inattentive to VA-7. But both members probably carried burdens of leadership home, not always able to demonstrate why they had to act in a way that was best for an entire caucus that represents a broad spectrum of ideology, geography, experience and electoral security.

And this is where the real warning signs emerge. There is a growing disconnect happening between Democratic leadership and its base right now that mirrors what Republicans have been confronting since 2011. This isn’t always manifested in policy disputes. Oftentimes it is tactical or with respect to matters of perception. But to the degree that the disconnect exists, it is problematic for the party, opening the door for opportunists and charlatans to hijack the brand and agenda.

In 2014, the Tea Party had already plucked off candidates and become the arbiter of ideological hearsay. Expectations were unrealistically high that the House could do more to reverse the Obama agenda. Republican voters acted on it by electing Donald Trump, the ultimate middle finger candidate.

In 2018, Democrats are now truly experiencing the emergence of a Bernie Sanders inspired leftist, Democratic Socialist discontent. And the identity politics that the party has capitalized on for years is also proving determinative in electoral outcomes. Democrats would be wise to not dismiss the possibility of their own voters looking for less-than-ideal outlets for their anger.

But they shouldn’t overreact either. Doing so would, ironically, make the problem worse for everyone. Reaching for the extremes to avoid future losses increases the polarization and exacerbates unmet expectations.

The Catch-22 of this political era is that voters want Washington to work better but without an iota of compromise. Banging the no-compromise drum will relieve the headache but it ignores the illness.

The base wants their anger satisfied with action, even when it is not possible. Between 2010 and 2016, too many Republicans promised to repeal the Affordable Care Act when logic easily forebode that President Obama would never sign a bill overturning his signature policy achievement.

Democrats will face similar pressure to go beyond what is possible in the moment to resist someone their voters believe is a historically unique threat. It will not be enough to say you oppose Trump, you have to do something that feels equal in scope to the visceral loathing.

This will play itself out in the upcoming Supreme Court battle. Democratic voters want something done to block an appointment while lawmakers know there is nothing they can do. The less honest they are about that, the worse the problem will get. And it will only grow from there.

Does anyone seriously believe that Democratic voters won’t want impeachment hearings almost immediately if they are to retake the House? Nancy Pelosi and Chuck Schumer are afraid to say the word but their incoming class of freshman will not be as hesitant. Indeed, Ocasio-Cortez said she would push for impeachment when elected.

Democrats will have to wrestle with this lurch toward the extremes, just as Republicans did. The party will have to grapple with the inability to pass single payer health care or abolish ICE if they retake Congress, just as the GOP let down its own following by not overturning Obamacare.

Republicans, after all, are still confronting the problem. The party’s base remains distrustful of congressional leaders even as they pass an agenda that Trump takes credit for.

Both sides can be better prepared. Leaders need to not just set realistic expectations, but encourage their conferences to do the same. They need a plan for responding incrementally to the demands of their activist wings without sacrificing the center that swings more closely in divided districts and ultimately determines control of Congress.

Democrats can do this by elevating younger and more diverse members to leadership and speaking more about economic inequality and fairness, rather than the Trump tweet of the day. They can recruit more youthful progressive candidates Ocasio-Cortez in heavily Democratic districts and build their farm team.

They, like Republicans, should also recognize the institutional distrust many voters are feeling and propose rational policies to address it, like more government transparency and oversight measures.

Most incumbents remain safe from primary defeat, but the traditional levers of maintaining that status quo—party control, fundraising, earned media and name recognition—are all weakening, if not crumbling. Without serious changes, both parties will continue to capitalize on this by threatening once-popular lawmakers and leaders with early retirement.