Usually what I hear is that non-competition provisions are not enforceable. Answering like a true lawyer- it depends.
Like so many other issues, California is unique as it is the only state in the entire U.S. that will not enforce these provisions against employees and for the most part, franchisees. This is based on California’s very strong and long running public policy protecting the right to work.
Non competition clauses can be enforced where some form of “goodwill” is passed from one to another. For example, a corporation (or shareholder) can repurchase a departing shareholder’s stock and enforce a non-competition agreement, or a business owner can sell a business to a buyer who can enforce a non-compete against the seller.
There are other exceptions. During employment, an employee, cannot compete against his or her employer and is required to abide to a duty of loyalty during employment (but after leaving the job, it is a different story.) Also Confidentiality Agreements, trade secrets, and non-solicitation agreements (of clients) can often be enforced.
So there is no pat answer to whether non-competition and related restrictions are enforceable.