White House Press Secretary Josh Earnest on Friday advised states considering anti-LGBT bills to look to North Carolina's experience on the issue.

Republican lawmakers in that state last year approved House Bill 2, the first state law in the nation to prohibit transgender people from using the bathroom of their choice in public buildings. The law proved unpopular and led to a vocal backlash. Then-Governor Pat McCrory's continued defense of the law as he sought reelection appears to have contributed to his defeat.

(Related: On his way out, Pat McCrory blames anti-gay law for election loss.)

Several states in recent weeks have announced similar bills, including Texas and Virginia.

When asked whether the incoming Trump administration should speak out against the proposals – as the Obama administration has – Earnest replied that lawmakers in those states should consult with McCrory.

“I think the first observation I would make is I'd encourage the leaders of the states that you named to consult with outgoing North Carolina Gov. Pat McCrory about whether or not that's a particularly smart political idea. I'm not sure that it is,” Earnest said.

“I would also encourage them to contact the North Carolina Chamber of Commerce to determine whether or not the state of North Carolina benefited economically from implementing these policies,” Earnest added. “They did not when you consider the business decisions that were made by not just high-profile organizations like the NCAA and the NBA, but also other businesses that were looking to expand their footprint and expand their business in that state. They chose not to do so because they were concerned that their employees and their customers were at heightened risk of being discriminated against.”