@calimero-network/mero-platform-react
v0.1.0
Published
React bindings for @calimero-network/mero-platform: useDeepLink (badge/notify hooks to come).
Readme
@calimero-network/mero-platform-react
React bindings over @calimero-network/mero-platform.
useDeepLink
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.
react is a peer dependency (>=17).
