Appearance
Documentation / expo / useEmbeddedWalletStateChange
Function: useEmbeddedWalletStateChange()
useEmbeddedWalletStateChange(
__namedParameters
):void
Attach callbacks for state changes on embedded wallets
Parameters
• __namedParameters: UseOnEmbeddedWalletStateChange
Returns
void
Example
ts
useEmbeddedWalletStateChange({
onStateChange: (state) => {
if (state.status === 'not-created') {
return router.replace('/create-wallet');
}
if (state.status === 'connected') {
return router.replace('/');
}
},
});