If you move to say, Nevada, before moving to China or wherever, but you always intended to return to CA afterwards, then for state tax purposes you never stopped being a CA resident. So, for example, if you keep a storage locker with your furniture in Cupertino for when you return, you clearly never intended to permanently leave and so you're still a CA resident for tax purposes.
If you don't plan on coming back to CA after moving to China or wherever, you stop being a CA resident immediately and only owe state taxes for the part of the year you still lived in CA. And it's easy to show that you are no longer a CA resident, for example, by selling all of your CA-based property.