Are you worried that your spouse may take your child to a different state when you get divorced? Are you concerned that he or she may then ask the courts in that state to rule on custody of the child, potentially making it so that you lose the right to see that child?
If so, you typically do not need to worry. Under the Uniform Child Custody Jurisdiction and Enforcement Act, the courts in a child's home state have to make the ruling in the vast majority of cases. California and 47 other states use the Uniform Child Custody Jurisdiction and Enforcement Act; only Vermont and Massachusetts do not.