For decades, the word “socialist” was treated more as a smear than as a viable stance in national politics. Then, the remarkable popularity of Bernie Sanders and his “democratic socialism” among young people in the 2016 primary shocked many observers. Poll after poll since then has confirmed this new reality. Gallup, for instance, recently found that half of millennials and members of Gen Z have a favorable view of “socialism,” compared with a third of Baby Boomers.

A big driver seems to be young people’s resentment of the rich: National surveys Cato has conducted with YouGov show that young people are 20 to 30 percentage points more likely than older people to believe the rich gained their wealth by taking advantage of people, and that violence against the rich can be justified. Americans under 30 are the only cohort with a majority (53 percent) who agree that “wealth should be taken from the rich to give to the poor,” and they are about 20 percentage points more likely to support raising top marginal tax rates. Some of this is probably a reaction to Donald Trump, a billionaire whom young voters tend to dislike, and some of it is just part of being young: Baby Boomers and Gen Xers were more resentful of the rich and supportive of activist government in their youth than they are today (at a rate similar to today’s young people). But for now, presidential candidates must grapple with how to address young people’s support of socialism.

It’s clear that inveighing against the rich, as Sanders and Elizabeth Warren have done in the Democratic primary, resonates with young people—though not with their parents and grandparents. While Democratic candidates might find socialistic rhetoric and policies help to mobilize young voters in the primaries, they will need a different strategy to win over voters in the general election.