import { useDeepLink } from "@calimero-network/mero-platform-react";
function App() {
useDeepLink((intent) => {
if (intent.params.invitation) {
joinWith(intent.params.invitation);
intent.resolve(); // ack so it never replays
}
});
return <Routes />;
}
Fires for any deep-link intent — from the URL, the launcher bridge, or the PWA
launch queue — including one buffered before the component mounted (so an
invitation survives the auth/reload churn until the app acks it). Uses the
latest handler each render without re-subscribing; unsubscribes on unmount.