Texas got a little older and a little more diverse last year, data released Thursday from the U.S. Census Bureau shows.

The state’s median age increased from 34.5 in July 2016 to 34.6 in July 2017 — a trend that state demographer Lloyd Potter said is a result of baby boomers continuing to age.

“Even though we’re one of the youngest states, we are getting older,” he said.

But as baby boomers start dying in greater numbers in coming years, the state’s median age could start to decline, Potter said.

A larger population of young people would be a boon for Texas’ ability to fill an ever-increasing number of jobs to power a fast-growing economy.

Migration into the state, coupled with generally higher fertility among Latinos than in the non-Hispanic white population, has also driven an increase in the state’s Latino population, he said.

Texas added 234,000 Hispanic residents over the year, the most of any state, bringing the overall Hispanic population to roughly 11.2 million.

Still, Potter said that his office, which produces detailed population estimates for the coming years and decades, pushed forward its forecast for when the state would switch from having more white people than any other race to having a Latino plurality.

“We had projected that the Latino population would exceed the ... white population by 2020 and that’s probably not going to happen,” he said.

Based on the new trends, he said, he now expects Latinos to outnumber non-Hispanic white people in Texas by 2022.

That’s probably a result of a slight decline in birth rates among Latinos as well as a slowing of immigration from Mexico and other Latin American countries over the last decade, Potter said.

Meanwhile, he said, growth in the state’s white population has effectively flattened.

In any case, demographers have said for years that Texas' increasing ethnic diversity will shape the state's future.

The Lone Star State’s populations of Asians and people who identified as two or more races both grew by about 4 percent over the year.

And at 3.8 million, Texas had the largest black or African-American population of any state in the country.

Nationally, Asians were the fastest-growing racial group, the data show, up 3.1 percent — an increase that is largely due to migration as opposed to natural increase, which is when more people are born in a group than die.

The nation’s second-fastest-growing racial group was people of two or more races. That, demographers said, was mostly due to natural increase.

Non-Hispanic whites were the only group to actually see a slight population loss over the year.

Experts caution against expecting demographic shifts — which tend to move slowly — to immediately translate into political shifts.

In Texas, at least, Southern Methodist University political scientist Cal Jillson told The Dallas Morning News when former Dallas County Sheriff Lupe Valdez became the first Latina to win a major-party nomination for governor, "there's a 20-year gulf between where we are now and when a Hispanic electorate will help create a [Democratic] majority."