Nope. It doesn't require compensation. And it applies even if your are laid off, fired etc. I've seen some that extend for 2 years. Its legalized slavery which is why California outlaws them.
There's even worse things out there for employees. I've read about ownership of all ideas/work clauses including outside of work hours while employed and enforced in a court of law. Imagine doing a startup nights and weekends only having it taken from you.
Anything that extends for more than 6 months and isn't extremely narrow in terms of geography or activities will have a hard time standing up in court. The employer has no right to deny a person a living.
As for IP stuff, that's really a case by case basis with each companies contract and how reasonable the claim that special resources and information made available by the employer were behind the development of the ip. If you're working for Starbucks and patent an algorithm for targeted advertising than no way in hell. But if you work for Garmin and develop a method to improve GPS reception in small devices, you're probably screwed.
And most of that stuff is pretty standard across the country.
There's even worse things out there for employees. I've read about ownership of all ideas/work clauses including outside of work hours while employed and enforced in a court of law. Imagine doing a startup nights and weekends only having it taken from you.