California's law only covers things which are not related to the company's current or future anticipated business. For a company like Facebook or Google that covers so much ground that the law may as well not exist.
>https://law.justia.com/codes/california/2011/lab/division-3/...
It says:
>(a) Any provision in an employment agreement which provides that an employee shall assign, or offer to assign, any of his or her rights in an invention to his or her employer shall not apply to an invention that the employee developed entirely on his or her own time without using the employer s equipment, supplies, facilities, or trade secret information except for those inventions that either:
> (1) Relate at the time of conception or reduction to practice of the invention to the employer s business, or actual or demonstrably anticipated research or development of the employer; or