Creates a Connect instance for use with ConnectComponentsProvider. This instance manages the configuration and state for Connect embedded components.

const connectInstance = loadConnectAndInitialize({
publishableKey: 'pk_test_123',
fetchClientSecret: async () => {
const response = await fetch('/account_session');
const { client_secret } = await response.json();
return client_secret;
},
appearance: {
variables: { colorPrimary: '#635BFF' }
}
});