that courts will not enforce it as written.
Some states will "blue pencil" them, meaning they will leave them in place but limit their applicability to the duration and scope (geographic as well as area of employment) they find to be reasonable. Other states, when they find the scope goes beyond reasonableness, will just throw out the restriction completely.
OP, do some Googling about how your specific state looks at them.