📄 tanstack/store/latest/docs/reference/variables/storetoderived

File: storetoderived.md | Updated: 11/15/2025

Source: https://tanstack.com/store/latest/docs/reference/variables/storetoderived



TanStack

Store v0v0

Search...

+ K

Auto

Log In

TanStack StartRC

Docs Examples GitHub Contributors

TanStack Router

Docs Examples GitHub Contributors

TanStack Query

Docs Examples GitHub Contributors

TanStack Table

Docs Examples Github Contributors

TanStack Formnew

Docs Examples Github Contributors

TanStack DBbeta

Docs Github Contributors

TanStack Virtual

Docs Examples Github Contributors

TanStack Paceralpha

Docs Examples Github Contributors

TanStack Storealpha

Docs Examples Github Contributors

TanStack Devtoolsalpha

Docs Github Contributors

More Libraries

Maintainers Partners Support Learn StatsBETA Discord Merch Blog GitHub Ethos Brand Guide

Documentation

Framework

React logo

React

Version

Latest

Search...

+ K

Menu

Getting Started

API Reference

Examples

Framework

React logo

React

Version

Latest

Menu

Getting Started

API Reference

Examples

On this page

__storeToDerived

Copy Markdown

Variable: __storeToDerived
============================

ts

const __storeToDerived: WeakMap<Store<unknown, (cb) => unknown>, Derived<unknown, readonly any[]>[]>;


const __storeToDerived: WeakMap<Store<unknown, (cb) => unknown>, Derived<unknown, readonly any[]>[]>;

Defined in: scheduler.ts:19

This is here to solve the pyramid dependency problem where: A /
B C \ / D

Where we deeply traverse this tree, how do we avoid D being recomputed twice; once when B is updated, once when C is.

To solve this, we create linkedDeps that allows us to sync avoid writes to the state until all of the deps have been resolved.

This is a record of stores, because derived stores are not able to write values to, but stores are

Edit on GitHub

Home

Partners Become a Partner

Code RabbitCode Rabbit CloudflareCloudflare AG GridAG Grid NetlifyNetlify NeonNeon WorkOSWorkOS ClerkClerk ConvexConvex ElectricElectric SentrySentry PrismaPrisma StrapiStrapi UnkeyUnkey

scarf analytics