@atlaskit/link-professor(英语:
使用量
import { SmartCardProvider, CardClient } from '@atlaskit/link-provider'
import { Card } from '@atlaskit/smart-card'
<SmartCardProvider client={new CardClient()}>
<Card />
</SmartCardProvider>
编程智能卡实验
产品供应稳定 choreographer 组件到 SmartCardProvider。在模块中创建一次
范围 createChoreographedContent 产品已经存在 useChoreographer 钩:
import { createChoreographedContent } from '@atlaskit/link-provider/create-choreographed-content';
const SmartCardChoreographer = createChoreographedContent(useChoreographer);
如果产品从 React 上下文获得其编舞器,则通过一个模块级自定义钩 读取上下文,并称为"本地钩". 在渲染过程中不要创建适配器 。 一个窝 提供者继承外部提供者的组件。 公共软件包不依赖运行时间 邮局.
实验可以使用 ChoreographedContent 从 @atlaskit/link-provider/choreographed-content数字 :
<ChoreographedContent
messageId="my-smart-card-experiment"
isActive={isEligible}
onUnavailable={cancelOpportunity}
>
{({ hasPermission }) => <MyPopup isOpen={hasPermission} trigger={normalAction} />}
</ChoreographedContent>
在等待许可或无法许可时继续采取正常行动。 关闭机会
(单位:千美元)isActive={false}(a) 行动、解雇或丧失资格;卸载也解除。 使用
每个实验都有明确的信息ID。 同时发生的情况有不同的登记身份证.
缺少主机集成,拒绝交付,并取消编舞失败. 一个被屏蔽
请求不自动重审。 适配器请求不自动过期. 当前本地人
编舞者可以将其默认的5分钟过期应用到队列请求;任何已过期或主机停止
隐藏UI. 关闭机会或卸载释放索赔.
这只协调参与应用程序的消息 。 实验还拥有特色门, 任务 观众检查 印象 解雇历史 分析 无门户消息或 需要无头的API.