# fba-hooks LLMs.txt > 供 LLM 快速理解 `@flatbiz/antd/fba-hooks` 的使用方式。 ## 模块定位 A helper to create a Context and Provider with no upfront default value, and without having to check for undefined all the time. ## 导入方式 ```ts import { fbaHooks } from '@flatbiz/antd/fba-hooks'; // 也可以从主入口导入:import { ... } from '@flatbiz/antd'; ``` ## 公开导出 - `createCtx` - A helper to create a Context and Provider with no upfront default value, and without having to check for undefined all the time. - `fbaHooks` - `UseEffectParams` - `UseEffectReturn` - `EffectCallback` - `DependencyList` - `useArrayChange` - `Demo` - `useCopyRemoveSpace` - 移除复制文本中前后空格 - `CopyRemoveSpaceProps` - `useEffectCustomAsync` - `useEffectCustom` - `useEffectOnce` - 只执行一次的 effect,后续依赖项变化不会再次执行 - `useMemoCustom` - 自定义控制 useMemo 依赖 - `usePrevious` - `ShouldUpdateFunc` - `useResponsivePoint` - 获取响应式节点 - `useThemeToken` - `useUuid` ## 依赖的 antd 能力 `Grid`、`theme` ## Props / 配置要点 ### CopyRemoveSpaceProps - `target`(可选):: () => Element;设置监听复制范围,如果不设置则监听全局 - `ignoreClass`(可选):: string[];忽略的class配置(不参与copy逻辑处理的class),例如:['ace_editor'] ## 使用规则与行为 - A helper to create a Context and Provider with no upfront default value, and without having to check for undefined all the time. - 设置监听复制范围,如果不设置则监听全局 - 忽略的class配置(不参与copy逻辑处理的class),例如:['ace_editor'] - 移除复制文本中前后空格 - 只执行一次的 effect,后续依赖项变化不会再次执行 - 自定义控制 useMemo 依赖 - 获取响应式节点 ## 基础示例 ```tsx import { fbaHooks, type CopyRemoveSpaceProps } from '@flatbiz/antd/fba-hooks'; const props: CopyRemoveSpaceProps = { // 按业务传入必要参数 }; ; ``` ## 源码索引 - `src/fba-hooks/create-ctx.ts` - `src/fba-hooks/index.ts` - `src/fba-hooks/type.effect.ts` - `src/fba-hooks/use-array-change.ts` - `src/fba-hooks/use-copy-remove-space.ts` - `src/fba-hooks/use-effect-custom-async.ts` - `src/fba-hooks/use-effect-custom.ts` - `src/fba-hooks/use-effect-once.ts` - `src/fba-hooks/use-memo-custom.ts` - `src/fba-hooks/use-previous.ts` - `src/fba-hooks/use-responsive-point.ts` - `src/fba-hooks/use-theme.ts` - `src/fba-hooks/use-uuid.ts` ## 给 LLM 的注意事项 - 优先使用 `@flatbiz/antd/fba-hooks` 或主入口 `@flatbiz/antd` 的公开导出,不要引用内部实现文件。 - 当 Props 与 antd 原组件同名能力冲突时,以本模块导出的 Props 类型为准。 - 若文档未覆盖某个边缘参数,请读取上方源码索引中的类型定义和 JSDoc。