DEV Community · AI· Sherotree·· 8 天前AI 评分62
用现有 query-key 工厂约束智能体生成查询键
Give the agent the existing query-key factory, not stringly-typed query keys
AI 导读
作者建议让智能体为查询和缓存失效使用仓库已有的 query-key 工厂,而不是在组件中手写字符串或数组键。手工键可能使 mutation 未能刷新列表,或让同一实体的钩子落入不同缓存位置;文中还提供了提示词示例和代码审查检查项。
来源:DEV Community · AI · dev.to