Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tryvital/vital-link

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tryvital/vital-link

React hooks and components for integrating with the Vital Link.

  • 0.1.7
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React hooks and components for integrating with the Vital Link.

Install

With npm:

npm i @tryvital/vital-link

With yarn

yarn add @tryvital/vital-link

Documentation

The official Vital Link docs provide a full reference on using this library.

Examples

Using React hooks

import React, { useCallback } from 'react';
import { useVitalLink } from '@tryvital/vital-link';

const App = () => {
  const onSuccess = useCallback((metadata) => {
    // send token to server
  }, []);

  const config = { onSuccess }

  const { open, ready, error, env: "sandbox" } = useVitalLink(config);

  const handleVitalOpen = async () => {
    setLoading(true);
    const GENERATED_LINK_TOKEN = await getTokenFromBackend(userKey);
    open(GENERATED_LINK_TOKEN);
    setLoading(false);
  };


  return (
      <button
      type="button"
      className="button"
      onClick={handleVitalOpen}
      disabled={isLoading || !ready}
    >
      Open Vital Link
    </button>
  );
};
export default App;

Keywords

FAQs

Package last updated on 03 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc