The U.S. Supreme Court wrote a fitting conclusion last week to a four-year challenge to Missouri’s licensing requirements for braiding hair.

The high court’s order, in the case of Niang v. Tomblinson, directed the district court to dismiss the case, recognizing that the Missouri General Assembly effectively resolved the challenge when it passed new, less burdensome regulations.

Other state legislatures would be wise to follow the example of Missouri, and other states such as Nebraska, in reconsidering onerous occupational-licensing laws—if not to encourage entrepreneurship, then at least to avoid long and costly lawsuits like this one (and similar cases in Louisiana and Texas).

Missouri law required would-be hair-braiders to shell out thousands of dollars for more than 1,000 hours of cosmetology training—that omitted instruction on hair-braiding.

Yet anyone who braided hair for money without first jumping through those hoops faced potential criminal penalties, including up to 15 days in jail, and up to $300 in fines.

While that might seem like a slap on the wrist to some, to others it is a hefty price to pay for plying skills that costly state-mandated schooling would not teach anyway.

In 2014, the Institute for Justice, a nonprofit law firm, sued the Missouri Board of Cosmetology and Barber Examiners in federal court, arguing that the state’s harebrained hair-braiding regulations were not rationally related to the state’s purported interest in protecting consumers from such alleged hazards as “hair loss, inflammation, and scalp infection.”

The plaintiffs in the case were Joba Niang and Tameka Stigers, who became successful businesswomen and hair-braiders despite lacking state cosmetology licenses.

Their natural African-style hair-braiding practices are labor-intensive, but do not involve heat or chemicals.

Still, the federal district court and the 8th U.S. Circuit Court of Appeals ruled against them.

In January, a three-judge panel of the 8th Circuit wrote that a state “‘may exact a needless, wasteful requirement in many cases,’ which may ‘not be in every respect logically consistent with its aims.’” The court concluded that “the fit between the licensing requirement and the state’s interest is imperfect, but not unconstitutionally so.”

Fortunately, Niang and Stigers petitioned the U.S. Supreme Court to review their case and, while their petition was pending, the Missouri General Assembly enacted new licensing requirements for hair-braiders that are less “needless” and “wasteful.”

State lawmakers chose to exempt African-style hair-braiders from Missouri’s cosmetology licensing scheme and to provide a special hair-braiding license.

The new law, which took effect in August, requires hair-braiders to pay a $20 fee, fill out a registration, watch an instructional video, and submit to state inspections.

According to the Institute for Justice, Missouri is now “among the 16 states that require a specialty license for braiders, rather than a full cosmetology license,” while 25 require no license for hair-braiding.

The Missouri Board of Cosmetology and Barber Examiners is still working, however, to implement the new law.

“We’re glad that our four-year fight for braiding freedom is finally drawing to a close,” Stigers said. “We would like to see the cosmetology board finish creating the new registration process for braiders. We have a right to braid hair for a living without any further uncertainty about the legality of our businesses under Missouri law.”

Although the new licensing system is not yet up and running, it did render Niang and Stigers’ lawsuit moot. And last week, the U.S. Supreme Court’s order vacated the 8th Circuit’s judgment and instructed the district court to dismiss the case.

Now, the 8th Circuit’s blessing of “needless, wasteful” restrictions on what the Institute for Justice (and others) have dubbed “the right to earn a living” is no longer binding law.

Niang, Stigers, and other hair-braiders in Missouri will have a more sensible set of hoops to jump through to make an honest living.

Other states can—and should—treat this case as motivation to reconsider onerous occupational-licensing laws—before someone sues them.