react-manifest-bridge
v1.2.1
Published
A React component for Manifest Bridge
Downloads
277
Readme
react-manifest-bridge
React hook and components for integrating with Manifest Bridge
Compatibility
React 16.8+
Install
With npm:
npm install --save react-manifest-bridge
With yarn:
yarn add react-manifest-bridge
Documentation
Please refer to the official Manifest Bridge docs
Using React hooks
import { useManifestBridge } from 'react-manifest-bridge';
// ...
// transfer in flow
const { open } = useManinfestBridge({
accessToken: 'YOUR_BRIDGE_TOKEN',
clientId: 'YOUR_CLIENT_ID',
transferIntentReference: 'YOUR_TRANSFER_INTENT_REFERENCE',
environment: 'development',
onSuccess: (transferData) => {
// do something
},
onClose: ({transferIntentStatus, transferData})=>{
// do something
}
});
return (
<button onClick={open}>
Transfer with Manifest
</button>
);
ℹ️ See full source code example at sample code