loyalty-protocol
v3.0.8
Published
A React hook for communicating with the Loyalty Protocol iframe.
Readme
loyalty-protocol
A React hook for communicating with the Loyalty Protocol iframe.
Installation
npm install loyalty-protocolUsage
import { useLoyaltyChannel } from "loyalty-protocol";
const { sendInformationToLoyaltyProtocol } = useLoyaltyChannel();
sendInformationToLoyaltyProtocol({ url: "https://example.com" });API
useLoyaltyChannel
Returns an object with the following method:
sendInformationToLoyaltyProtocol({ url }): Sends a message to the Loyalty Protocol iframe.
License
ISC
