3.7.0 • Published 2 months ago

@tryfinch/react-connect v3.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

@tryfinch/react-connect

NPM

Install

npm install --save @tryfinch/react-connect

Usage

import React, { useState } from 'react';
import { useFinchConnect } from '@tryfinch/react-connect';

const App = () => {
  const [code, setCode] = useState(null);

  const onSuccess = ({ code }) => setCode(code);
  const onError = ({ errorMessage }) => console.error(errorMessage);
  const onClose = () => console.log('User exited Finch Connect');

  const { open } = useFinchConnect({
    clientId: '<your-client-id>',
    // The below are only a few of Finch's product scopes, please check Finch's [documentation](https://developer.tryfinch.com/docs/reference/ZG9jOjMxOTg1NTI3-permissions) for the full list
    products: ['company', 'directory'],
    // Check Finch's [documentation](https://developer.tryfinch.com/docs/reference/96f5be9e0ec1a-providers) for the full list of payroll provider IDs
    // payrollProvider: '<payroll-provider-id>',
    // For `sandbox`, omit or use 'false' if in production. Use "finch" or "provider" for sandbox testing, depending on test plan. See Finch's [documentation](https://developer.tryfinch.com/implementation-guide/Test/Testing-Plan) for an overview of Finch and Provider sandboxes.
    // sandbox: false,
    // manual: false,
    // zIndex: 999,
    onSuccess,
    onError,
    onClose,
  });

  return (
    <div>
      <header>
        <p>Code: {code}</p>
        <button type="button" onClick={() => open()}>
          Open Finch Connect
        </button>
      </header>
    </div>
  );
};
3.7.0

2 months ago

3.6.1

5 months ago

3.6.0

5 months ago

3.4.0

6 months ago

3.3.1

6 months ago

3.3.0

6 months ago

3.5.0

6 months ago

3.1.1

11 months ago

3.1.0

11 months ago

3.0.0

1 year ago

2.8.1

1 year ago

2.8.0

1 year ago