Incorporating outside of California
California is notorious, among other things, for its annual Franchise Tax that starts at $800. This is one of the reasons young businesses are looking for ways to do business in California while being registered elsewhere (for example in Nevada, Wyoming or Delaware).
The problem is, if the business is located in California it must be registered there, either as domestic or foreign entity. As far as I know, the state of California is very aggressive on searching for businesses that are trying to "hide" in other states while being physically present in California, and they tend to crack down on those businesses.
Some business such as online retailers that do not declare any business expenses in California might be off the hook. However, even if the only connection is the fact that the owners reside in California, that might be enough to make a case that this is a California-based company, and thus must be registered in that state.
Finally, there might be some reasoning behind registering your company in one of the friendlier states such as Delaware or Wyoming, if you plan to eventually move the business out of California. If that is the case then you could register a foreign entity in California, and then after the move close it and register in the new state.
There might be several other strategies, however it all depends on your intentions.