I have multiple rentals in different states. Can I use losses in one state to offset income in another?

For example, if my residential rentals have:
1) NET loss of 10k in NH
2) NET profit of 10k in MA

From the federal tax perspective, my Schedule E income will be $0, if I understand correctly. But how does it work from the NH and MA states perspective?