At the height of the McCarthy era, states and municipalities instituted loyalty oaths and anti-sedition laws almost at will. In the Jenks and Slowacher cases (I believe), the Supreme Court threw all of them out, ruling that Congress had occupied the field of sedition to the exclusion of the states and municipalities.
That was a tremendously positive ruling. States and cities were using their "laws" to fire teachers and other civil servants, impose curriculum changes, etc. That whole era was one of the most dangerous times in America.