标签: hellosign-api

无法使“hellosign-embedded”与 TS 项目中的“next/dynamic”一起使用

正如标题所说,我无法与之hellosign-embedded合作next

我的应用程序将通过 CDN 提供服务,因此如果它无法与 SSR 配合使用,我也不会担心

const HelloSign: any = dynamic(
  (): any => {
    return import("hellosign-embedded")
  },
  { ssr: false }
)

export default function Home() {

  const client =
    typeof window !== "undefined"
      ? new HelloSign({
          allowCancel: false,
          clientId: "HELLO SIGN CLIENT ID", // DEV HelloSign Client ID
          skipDomainVerification: true,
        })
      : null

  return null
}
Run Code Online (Sandbox Code Playgroud)

我不断得到TypeError: HelloSign is not a constructor

错误图像

我还在 GitHub 上创建了这个问题并提供了更多信息

dynamic reactjs hellosign-api next.js react-hooks

1
推荐指数
1
解决办法
472
查看次数

标签 统计

dynamic ×1

hellosign-api ×1

next.js ×1

react-hooks ×1

reactjs ×1