{"record":{"id":"d047291fa2a91d10","repo":"TanStack/table","slug":"feature-not-supported-in-current-reactivity-implem-d04729","errorCode":null,"errorMessage":"Feature not supported in current reactivity implementation","messagePattern":"Feature not supported in current reactivity implementation","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/table-core/src/core/reactivity/renderPhaseReactivity.ts","lineNumber":70,"sourceCode":" * @example\n * ```ts\n * import { batch, createAtom } from '@tanstack/react-store'\n *\n * export const reactReactivity = () =>\n *   renderPhaseReactivity({ createAtom, batch })\n * ```\n */\nexport function renderPhaseReactivity(\n  primitives: RenderPhaseReactivityPrimitives,\n): RenderPhaseReactivityBindings {\n  const { createAtom, batch } = primitives\n  const commitAtom = createAtom(0)\n\n  return {\n    createOptionsStore: false,\n    wrapExternalAtoms: false,\n    addSubscription: () => {\n      throw new Error(\n        'Feature not supported in current reactivity implementation',\n      )\n    },\n    unmount: () => {\n      throw new Error(\n        'Feature not supported in current reactivity implementation',\n      )\n    },\n    schedule: primitives.schedule ?? ((fn) => queueMicrotask(fn)),\n    batch,\n    untrack: (fn) => fn(),\n    createReadonlyAtom: <T>(fn: () => T, atomOptions?: TableAtomOptions<T>) => {\n      const compare = atomOptions?.compare ?? Object.is\n      let hasSnapshot = false\n      let snapshot: T\n\n      const getSnapshot = () => {\n        const nextSnapshot = fn()","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/TanStack/table/blob/d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6/packages/table-core/src/core/reactivity/renderPhaseReactivity.ts#L52-L88","documentation":"renderPhaseReactivity in packages/table-core/src/core/reactivity/renderPhaseReactivity.ts returns bindings whose addSubscription throws. This render-phase reactivity model recomputes atoms during render and does not support external subscription registration. It is shared by the react, preact, lit, and octane adapters.","triggerScenarios":"Any code path calling bindings.addSubscription(...) on bindings produced by renderPhaseReactivity, e.g. a feature that expects subscription-capable reactivity.","commonSituations":"Enabling a feature written against store-based bindings with the render-phase (React/Preact/Lit/Octane) adapters; framework-agnostic plugin code registering subscriptions.","solutions":["Avoid addSubscription with render-phase bindings; read atoms during render so they are tracked automatically.","Use a reactivity implementation that supports subscriptions if the feature requires them.","Supply custom TableReactivityBindings overriding addSubscription with a supported implementation."],"exampleFix":"// before\nbindings.addSubscription(() => log(atom.get()))\n// after\n// track reads during render instead\nconst value = atom.get() // re-renders when atom changes","handlingStrategy":"validation","validationCode":"if (!('addSubscriptionSupported' in bindings) || bindings.addSubscription === undefined) {\n  // skip subscription-based path\n}","typeGuard":"function canSubscribe(b: TableReactivityBindings): boolean {\n  try { return b.addSubscription.length >= 0 && !isThrowingStub(b.addSubscription) } catch { return false }\n}","tryCatchPattern":"try {\n  bindings.addSubscription(cb)\n} catch (e) {\n  if ((e as Error).message.includes('Feature not supported')) {\n    // switch to render-phase tracking: read the atom during render\n  } else throw e\n}","preventionTips":["In render-phase frameworks (React/Preact/Lit/Octane), track atoms by reading them during render","Do not port store-adapter subscription code to render-phase adapters unchanged","Keep a capability matrix of the reactivity adapters your features support"],"tags":["reactivity","unsupported-operation","render-phase"],"backgroundTag":"reactivity-binding-unsupported","analyzedSha":"d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6","analyzedAt":"2026-08-28T21:52:44.679Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}