Last year, basketball superstar LeBron James helped open a new public school in an Akron, Ohio, school district, designed to provide academics as well as social and emotional supports to at-risk students. Now he’s adding to that investment, partnering with a hotel chain to build transitional housing for families whose children attend the I Promise school but are experiencing homelessness or struggle to have stable, safe housing.

The LeBron James Family Foundation made the announcement Monday along with Graduate Hotels, saying that the housing will be located within a few blocks of the school in a building that will be renovated and furnished.

In making the announcement, the foundation issued a release that quoted James as saying he and others involved in the I Promise school have come to realize that students need stable housing to learn. Akron taxpayers fund the school and its daily operations, while James’ foundation pays for the wrap-around services and other programs there. He said:

Initially, our work was focused on helping these kids earn an education. But we’ve found that it is impossible to help them learn if they are struggling to survive — if they are hungry, if they have no heat in the freezing winter, if they live in fear for their safety. We want this place to be their home where they feel safe, supported, and loved, knowing we are right there with them every step of the way as they get back on their feet.

That idea has long been recognized by educators, counselors and everybody else working at troubled schools, but most policymakers at the federal, state and local levels have never seen the wisdom in linking housing and social policy to school reform. In the past 20 years, they’ve mostly focused on raising test scores, with little or no acknowledgment of how living in unstable communities affects academic achievement.

James and the I Promise team realized this within a year of opening the school and plan to open the housing in time for the start of the 2020-21 school year, and they deserve applause for doing something about it.

James — who came under scrutiny last month for critical remarks he made about Houston Rockets general manager Daryl Morey’s tweet supporting protesters in Hong Kong — doesn’t have to spend his money this way. In fact, most celebrities who have jumped into education reform have put their names and money behind alternatives to traditional public schools, such as charters, which are publicly funded but privately operated. James put his money into the school district in his hometown, Akron.

The I Promise enterprise underscores the continuing problem with education funding in this country, where students who live in poverty attend schools with far fewer resources than schools attended by students who don’t.

Should it take the goodwill of a magnificently wealthy athlete to fund a school with all of the resources at-risk students need to succeed? Are American children served well by haphazard funding that depends on rich people to be philanthropic?

As I wrote last year when James helped open the I Promise school, Americans can achieve educational equity not through the generosity of the rich, who may decide after a while to fund something else, but through a public funding formula that does not, as occurs now, reward wealthier communities and punish poor ones.

The housing initiative by I Promise is a reminder that a focus on academics alone is not enough for at-risk students who do not have safe and stable housing, food security, and emotional and psychological support.

Michele Campbell, executive director of the LeBron James Family Foundation, said in the announcement:

Being able to offer this safe haven for our families is transformational in every sense of the word. This is about more than just getting kids to school. This is about keeping them alive. We’re seeing families struggling every day with very real and often times unexpected issues that turn their worlds upside down. This will allow the family time and opportunities to grow while not worrying if they’ll have a roof over their head.

And thank goodness for that.

(Clarification: Adding what the foundation pays for at I Promise school and what Akron taxpayers fund. The LeBron James Family Foundation does not pay for the building or teachers’ salaries or daily operations of the school.)