diff --git a/docs/core/atom.mdx b/docs/core/atom.mdx index 48d9686341..336ef2897d 100644 --- a/docs/core/atom.mdx +++ b/docs/core/atom.mdx @@ -180,6 +180,12 @@ For `fetch` use case, we can simply pass `signal`. See the below example for `fetch` usage. +#### `options.setSelf` + +It's a special function to invoke the write function of the self atom. + +⚠️ It's provided primarily for internal usage and third-party library authors. Read the source code carefully to understand the behavior. Check release notes for any breaking/non-breaking changes. + ## codesandbox diff --git a/src/vanilla/atom.ts b/src/vanilla/atom.ts index d7fba78de9..0c8181155b 100644 --- a/src/vanilla/atom.ts +++ b/src/vanilla/atom.ts @@ -9,6 +9,9 @@ type SetAtom = ( ...args: A ) => Result +/** + * setSelf is for internal use only and subject to change without notice. + */ type Read = ( get: Getter, options: { readonly signal: AbortSignal; readonly setSelf: SetSelf }