Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
baeda66
Use XState Store
davidkpiano Dec 12, 2025
b1b75ee
Convert tests
davidkpiano Dec 14, 2025
2866b9f
Angular
davidkpiano Dec 24, 2025
6e09e12
Preact
davidkpiano Dec 24, 2025
f7b36fc
Solid
davidkpiano Dec 24, 2025
76f3443
Svelte
davidkpiano Dec 24, 2025
cae9a74
Vue
davidkpiano Dec 24, 2025
f7b7ee0
Vue (again)
davidkpiano Dec 24, 2025
e9297a5
ci: apply automated fixes and generate docs
autofix-ci[bot] Dec 27, 2025
646875c
WIP: move implementation into store
davidkpiano Jan 2, 2026
7b0598a
Make all tests pass
davidkpiano Jan 3, 2026
7611dd8
createAtom -> createStore
davidkpiano Jan 11, 2026
8995416
Bye for now
davidkpiano Jan 11, 2026
6a0eb7e
Merge branch 'main' into davidkpiano/store
davidkpiano Jan 11, 2026
7dd832c
ci: apply automated fixes and generate docs
autofix-ci[bot] Jan 12, 2026
a96fbed
Update TS versions
davidkpiano Jan 18, 2026
d0a6100
Fix eslint type issues
davidkpiano Jan 19, 2026
a3af0a0
Trying to fix versions
davidkpiano Jan 30, 2026
4d04c0c
Fix sherif
davidkpiano Feb 6, 2026
e94d573
ci: apply automated fixes and generate docs
autofix-ci[bot] Feb 6, 2026
bc44d6a
So close
davidkpiano Feb 7, 2026
6b3fe55
Merge branch 'davidkpiano/store' of https://github.com/davidkpiano/st…
davidkpiano Feb 7, 2026
54fa9c4
I'm trying
davidkpiano Feb 7, 2026
366c183
WORK
davidkpiano Feb 7, 2026
f5a7a88
ci: apply automated fixes and generate docs
autofix-ci[bot] Feb 7, 2026
b3559c9
It's GREEEEENNN
davidkpiano Feb 7, 2026
ac9bb3a
Merge branch 'davidkpiano/store' of https://github.com/davidkpiano/st…
davidkpiano Feb 7, 2026
5f8fae6
ci: apply automated fixes and generate docs
autofix-ci[bot] Feb 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/framework/angular/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ export class AppComponent {}

**store.ts**
```typescript
import { Store } from '@tanstack/angular-store';
import { createStore } from '@tanstack/angular-store';

// You can instantiate the store outside of Angular components too!
export const store = new Store({
export const store = createStore({
dogs: 0,
cats: 0,
});
Expand Down
8 changes: 4 additions & 4 deletions docs/framework/angular/reference/functions/injectStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function injectStore<TState, TSelected>(
options?): Signal<TSelected>;
```

Defined in: [index.ts:19](https://github.com/TanStack/store/blob/main/packages/angular-store/src/index.ts#L19)
Defined in: [index.ts:16](https://github.com/TanStack/store/blob/main/packages/angular-store/src/index.ts#L16)

### Type Parameters

Expand All @@ -30,7 +30,7 @@ Defined in: [index.ts:19](https://github.com/TanStack/store/blob/main/packages/a

#### store

`Store`\<`TState`, `any`\>
`Atom`\<`TState`\>

#### selector?

Expand All @@ -53,7 +53,7 @@ function injectStore<TState, TSelected>(
options?): Signal<TSelected>;
```

Defined in: [index.ts:24](https://github.com/TanStack/store/blob/main/packages/angular-store/src/index.ts#L24)
Defined in: [index.ts:21](https://github.com/TanStack/store/blob/main/packages/angular-store/src/index.ts#L21)

### Type Parameters

Expand All @@ -69,7 +69,7 @@ Defined in: [index.ts:24](https://github.com/TanStack/store/blob/main/packages/a

#### store

`Derived`\<`TState`, `any`\>
`Atom`\<`TState`\> | `ReadonlyAtom`\<`TState`\>

#### selector?

Expand Down
4 changes: 2 additions & 2 deletions docs/framework/preact/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The basic preact app example to get started with the TanStack preact-store.

```tsx
import { render } from "preact";
import { Store, useStore } from "@tanstack/preact-store";
import { createStore, useStore } from "@tanstack/preact-store";

// You can instantiate the store outside of Preact components too!
export const store = new Store({
export const store = createStore({
dogs: 0,
cats: 0,
});
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/preact/reference/functions/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: shallow
function shallow<T>(objA, objB): boolean;
```

Defined in: [index.ts:130](https://github.com/TanStack/store/blob/main/packages/preact-store/src/index.ts#L130)
Defined in: [index.ts:116](https://github.com/TanStack/store/blob/main/packages/preact-store/src/index.ts#L116)

## Type Parameters

Expand Down
67 changes: 13 additions & 54 deletions docs/framework/preact/reference/functions/useStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,80 +5,39 @@ title: useStore

# Function: useStore()

## Call Signature

```ts
function useStore<TState, TSelected>(
store,
selector?,
options?): TSelected;
```

Defined in: [index.ts:104](https://github.com/TanStack/store/blob/main/packages/preact-store/src/index.ts#L104)

### Type Parameters

#### TState

`TState`

#### TSelected

`TSelected` = `NoInfer`\<`TState`\>

### Parameters

#### store

`Store`\<`TState`, `any`\>

#### selector?

(`state`) => `TSelected`

#### options?

`UseStoreOptions`\<`TSelected`\>

### Returns

`TSelected`

## Call Signature

```ts
function useStore<TState, TSelected>(
store,
selector?,
options?): TSelected;
selector,
options): TSelected;
```

Defined in: [index.ts:109](https://github.com/TanStack/store/blob/main/packages/preact-store/src/index.ts#L109)
Defined in: [index.ts:100](https://github.com/TanStack/store/blob/main/packages/preact-store/src/index.ts#L100)

### Type Parameters
## Type Parameters

#### TState
### TState

`TState`

#### TSelected
### TSelected

`TSelected` = `NoInfer`\<`TState`\>

### Parameters
## Parameters

#### store
### store

`Derived`\<`TState`, `any`\>
`Atom`\<`TState`\> | `ReadonlyAtom`\<`TState`\>

#### selector?
### selector

(`state`) => `TSelected`

#### options?
### options

`UseStoreOptions`\<`TSelected`\>
`UseStoreOptions`\<`TSelected`\> = `{}`

### Returns
## Returns

`TSelected`
4 changes: 2 additions & 2 deletions docs/framework/react/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ The basic react app example to get started with the TanStack react-store.
```tsx
import React from "react";
import ReactDOM from "react-dom/client";
import { Store, useStore } from "@tanstack/react-store";
import { createStore, useStore } from "@tanstack/react-store";

// You can instantiate the store outside of React components too!
export const store = new Store({
export const store = createStore({
dogs: 0,
cats: 0,
});
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: shallow
function shallow<T>(objA, objB): boolean;
```

Defined in: [index.ts:42](https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L42)
Defined in: [index.ts:5](https://github.com/TanStack/store/blob/main/packages/react-store/src/index.ts#L5)

## Type Parameters

Expand Down
43 changes: 43 additions & 0 deletions docs/framework/react/reference/functions/useSelector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: useSelector
title: useSelector
---

# Function: useSelector()

```ts
function useSelector<TAtom, T>(
atom,
selector,
compare): T;
```

Defined in: [useSelector.ts:13](https://github.com/TanStack/store/blob/main/packages/react-store/src/useSelector.ts#L13)

## Type Parameters

### TAtom

`TAtom` *extends* `AnyAtom` \| `undefined`

### T

`T`

## Parameters

### atom

`TAtom`

### selector

(`snapshot`) => `T`

### compare

(`a`, `b`) => `boolean`

## Returns

`T`
84 changes: 0 additions & 84 deletions docs/framework/react/reference/functions/useStore.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ title: "@tanstack/react-store"
## Functions

- [shallow](functions/shallow.md)
- [useStore](functions/useStore.md)
- [useSelector](functions/useSelector.md)
8 changes: 4 additions & 4 deletions docs/framework/solid/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ id: quick-start
The basic Solid app example to get started with the TanStack Solid-store.

```jsx
import { Store, useStore } from '@tanstack/solid-store';
import { createStore, useStore } from '@tanstack/solid-store';

// You can instantiate the store outside of Solid components too!
export const store = new Store({
Β  cats: 0,
Β  dogs: 0
export const store = createStore({
cats: 0,
dogs: 0
})

export const Display = (props) => {
Expand Down
2 changes: 1 addition & 1 deletion docs/framework/solid/reference/functions/shallow.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: shallow
function shallow<T>(objA, objB): boolean;
```

Defined in: [index.tsx:49](https://github.com/TanStack/store/blob/main/packages/solid-store/src/index.tsx#L49)
Defined in: [index.tsx:35](https://github.com/TanStack/store/blob/main/packages/solid-store/src/index.tsx#L35)

## Type Parameters

Expand Down
Loading
Loading