Kids today with their selfies and their Snapchats and their love of literature.

Millennials, like each generation that was young before them, tend to attract all kinds of ire from their elders for being superficial, self-obsessed, anti-intellectuals. But a study out today from the Pew Research Center offers some vindication for the younger set. Millennials are reading more books than the over-30 crowd, Pew found in a survey of more than 6,000 Americans.

Some 88 percent of Americans younger than 30 said they read a book in the past year compared with 79 percent of those older than 30. At the same time, American readers' relationship with public libraries is changing—with younger readers less likely to see public libraries as essential in their communities.

Overall, Americans are buying more books than they borrow, the study found. Among those who read at least one book in the past year, more than half said they tend to purchase books rather than borrow them. Fewer Americans are visiting libraries than in recent years, but more Americans are using library websites.

This is significant given what people say they value most about libraries—it's the place, not the books available there, that young people cite as most important.