you are partially correct.
yes, state by state matters, but you can still take away trends and patterns from national data. For an extreme example, if democrats were up by 40 pts nationally, it should be pretty obvious to anyone with a brain that would translate very well for them on a state by state basis.
Concurrently, lets say clinton in 2016 was projected to win the state of alabama by 10 pts. Now, one could say "hurrr durrr that's only one state, that doesn't have any say on what happens elsewhere" but again, anyone with a brain would be able to see that if clinton were going to win alabama by 10 points, that this would indicate an almost for sure electoral college victory, because if you are winning over a state 80%+ republican, you are almost certain to be polling as good if not better in any other state.
So, national data correlates to state data. This is where electoral projections in part come from. Thorough analysis will take into account polling within states but also look at national trends and other correlating effects to get an accurate picture.