@bindbee/react-link

中文文档
0.2.0发布于 2026/10/19MITTypeScriptCommonJS零依赖近 30 天下载 9286

Bindbee 连接器连接流的反钩包

中文使用文档
文档目录3 节
  1. 安装
  2. 使用量
  3. 自备部署

反应-链接

NPM

嵌入 Bindbee 连接器的回放 SDK 链接流

见详细文件: Bindbee SDK 文档

安装

npm install --save @bindbee/react-link

或者说

yarn add @bindbee/react-link

使用量

import React from "react";
// Run this in your React project:
// npm install --save @bindbee/react-link
import { useBindbeeMagiclink } from "@bindbee/react-link";

const App = () => {
  const handleOnSuccess = (temporary_token) => {
    // Use this token to get the connector_token
    console.log("Temporary Token:", temporary_token);
  };

  const handleOnClose = () => {
    // Optional: Perform any action when the user closes the linking flow
    console.log("Linking flow closed");
  };

  const { open } = useBindbeeMagiclink({
    linkToken: "LINK_TOKEN", // Replace LINK_TOKEN with the token retrieved from previous step,
    serverUrl: "https://api.bindbee.dev", // (OPTIONAL): use 'https://api-eu.bindbee.dev' for EU Region
    onSuccess: handleOnSuccess,
    onClose: handleOnClose,
  });

  return <button onClick={open}>Open Linking Flow</button>;
};

export default App;

自备部署

如果你在自己的基础设施上运行 Bindbee 链接应用程序和 API, 将钩子对准它们 linkUrl 财务报告和审定财务报表 serverUrl数字 :

const { open } = useBindbeeMagiclink({
  linkToken: "LINK_TOKEN",
  linkUrl: "https://link.your-domain.com", // Base URL of your self-hosted link app (defaults to https://link.bindbee.dev)
  serverUrl: "https://api.your-domain.com", // Base URL of your self-hosted API
  onSuccess: handleOnSuccess,
  onClose: handleOnClose,
});
  • linkUrl 绝对的 https URL (中文(简体) ). 平面 http 仅为 localhost用于地方发展.
  • 链接应用可能生活在子路径下(例如. https://your-domain.com/bindbee-link; 钩子负载 <linkUrl>/embed。 。 。 .
  • 源流中的事件只接受来源于 linkUrl。 。 。 .
  • 链接应用程序必须被您的应用程序嵌入: 确保不 X-Frame-Options 或者说 Content-Security-Policy: frame-ancestors 前面的页眉(比如在您反向代理)会屏蔽您的应用程序的出处.
  • 您的 API 必须允许 CORS 从链接应用程序的来源请求 .

版本与发布记录

@bindbee/react-link 共发布 10 个版本,首次发布于 2024/07/16;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.2.0latest2026/10/1919 天前
0.1.12026/09/111 个月前
0.1.02026/06/015 个月前
0.0.72025/06/271.4 年前
0.0.62024/11/182 年前
0.0.52024/07/172 年前

关于 @bindbee/react-link 的常见问题

@bindbee/react-link 是什么?

Bindbee 连接器连接流的反钩包

如何安装 @bindbee/react-link?

在项目目录运行 npm install @bindbee/react-link,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=18.0.0)、react-dom(>=18.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@bindbee/react-link 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bindbee/react-link 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bindbee/react-link 可以商用吗?

@bindbee/react-link 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bindbee/react-link 的下载量有多少?

根据 npm 官方下载统计,@bindbee/react-link 在 2026/10/08 – 2026/11/06 这 30 天内被下载 9,286 次,日均约 310 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bindbee/react-link 还在维护吗?

最新版本 0.2.0 发布于 2026/10/19(19 天前);至今共发布 10 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/07/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。