The state came in 40th in WalletHub’s recent ranking of the best states for raising a family.