Wrdn Effect Atom Reactivity Keys

Add reactivityKeys to effect-atom write mutation calls. Use when lint flags a useAtomSet mutation call that mutates data without invalidation keys.

usefulsoftwareco d480f36 780 B Updated

File contents

Effect-atom write mutations must say which reads they invalidate.

Fix Shape

  • Find the useAtomSet(...) write mutation call.
  • Add reactivityKeys to the mutation payload at the call site.
  • Use the narrowest keys that cover the rows/lists affected by the write.
  • Keep read-only probe/preview OAuth flows out of this pattern.
  • If the mutation should update UI immediately, check whether wrdn-effect-atom-optimistic also applies.

Good

await updateSource({
  params: { scopeId, sourceId },
  payload,
  reactivityKeys: [["sources", scopeId]],
});

usefulsoftwareco/executor/tree/main/.agents/skills/wrdn-effect-atom-reactivity-keys commit d480f3652d

Frequently asked questions

npx skillmds@latest add usefulsoftwareco/wrdn-effect-atom-reactivity-keys