Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
d634f62
start on retry feature
KevinVandy Aug 5, 2025
d03fe2b
add retry example
KevinVandy Aug 6, 2025
631c6e0
Merge branch 'main' into retry
KevinVandy Aug 7, 2025
338db04
aborts through async-retryer only
KevinVandy Aug 10, 2025
0f16e6c
add an optional pacer provider
KevinVandy Aug 10, 2025
3b86df9
add providers to main examples
KevinVandy Aug 11, 2025
a594529
feat: add initial setup for devtools
AlemTuzlak Aug 11, 2025
4584821
ci: apply automated fixes
autofix-ci[bot] Aug 11, 2025
9b63459
chore: fix test issues
AlemTuzlak Aug 11, 2025
13c12a2
chore: merge fix
AlemTuzlak Aug 11, 2025
c60e383
ci: apply automated fixes
autofix-ci[bot] Aug 11, 2025
a8f5096
chore:fix render issue
AlemTuzlak Aug 11, 2025
7badb9f
ci: apply automated fixes
autofix-ci[bot] Aug 11, 2025
db96874
ci: apply automated fixes
autofix-ci[bot] Aug 11, 2025
c102954
feat: drastically improve the pacer devtools UI
AlemTuzlak Aug 12, 2025
03fe008
ci: apply automated fixes
autofix-ci[bot] Aug 12, 2025
b220c67
chore: remove built-in tree in favor of devtools/ui
AlemTuzlak Aug 12, 2025
99d052b
ci: apply automated fixes
autofix-ci[bot] Aug 12, 2025
b1eb9e6
refactor to key
KevinVandy Aug 12, 2025
c7699df
ci: apply automated fixes
autofix-ci[bot] Aug 12, 2025
5df992f
rename devtool packages to be consistent with query devtool package n…
KevinVandy Aug 13, 2025
c145ad1
fix sherif
KevinVandy Aug 13, 2025
548caf5
separate left and right panels of devtools
KevinVandy Aug 13, 2025
f1cee1c
denser ui
KevinVandy Aug 13, 2025
57966f6
better right panel, emit entire instance
KevinVandy Aug 13, 2025
dd527a0
add some action buttons to devtools that kind of work
KevinVandy Aug 13, 2025
f088dc8
event bus goes both ways
KevinVandy Aug 14, 2025
7e853c0
all utils listen to devtools
KevinVandy Aug 15, 2025
8984c3d
Merge branch 'feat/add-devtools-to-pacer' into retry
KevinVandy Aug 15, 2025
2a50176
remove console log
KevinVandy Aug 15, 2025
185aa09
Merge branch 'feat/add-devtools-to-pacer' into retry
KevinVandy Aug 15, 2025
fa451f3
ci: apply automated fixes
autofix-ci[bot] Aug 15, 2025
75414d2
sync package versions
KevinVandy Aug 15, 2025
5c5d6c9
ci: apply automated fixes
autofix-ci[bot] Aug 15, 2025
6b372da
break up devtools components
KevinVandy Aug 16, 2025
5a72798
Merge branch 'feat/add-devtools-to-pacer' into retry
KevinVandy Aug 17, 2025
05a046a
default options
KevinVandy Aug 18, 2025
e42387e
ci: apply automated fixes
autofix-ci[bot] Aug 18, 2025
e931095
Merge branch 'main' into retry
KevinVandy Aug 27, 2025
471337b
ci: apply automated fixes
autofix-ci[bot] Aug 27, 2025
4eabc6c
package upgrades
KevinVandy Aug 28, 2025
c51ea37
Merge branch 'main' into retry
KevinVandy Sep 12, 2025
70437f6
Merge branch 'main' into retry
KevinVandy Sep 19, 2025
2d065df
update lock file
KevinVandy Sep 19, 2025
a179bb6
delete
KevinVandy Sep 29, 2025
6daa67f
package upgrades
KevinVandy Sep 30, 2025
f4532ab
Merge branch 'main' into retry
KevinVandy Sep 30, 2025
19ea030
merge main
KevinVandy Sep 30, 2025
0fe7939
clean up retry error tests
KevinVandy Oct 1, 2025
7e9a254
Merge branch 'main' into retry
KevinVandy Oct 4, 2025
f23f1c8
ci: apply automated fixes
autofix-ci[bot] Oct 4, 2025
4e3330f
fix async-throttler stuff
KevinVandy Oct 5, 2025
5abfe0c
fix retryers with per instance per execution
KevinVandy Oct 6, 2025
3173d1c
ci: apply automated fixes
autofix-ci[bot] Oct 6, 2025
d802c73
add maxExecutionTime to retryer
KevinVandy Oct 8, 2025
4228229
add getAbortController apis
KevinVandy Oct 12, 2025
12ecc5b
add changeset and add retry stuff to guides
KevinVandy Oct 15, 2025
d842757
generate docs
KevinVandy Oct 15, 2025
6e4b9d9
ci: apply automated fixes
autofix-ci[bot] Oct 15, 2025
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
10 changes: 10 additions & 0 deletions .changeset/chubby-laws-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@tanstack/react-pacer-devtools': minor
'@tanstack/solid-pacer-devtools': minor
'@tanstack/pacer-devtools': minor
'@tanstack/react-pacer': minor
'@tanstack/solid-pacer': minor
'@tanstack/pacer': minor
---

feat: added built-in retries and added better abort support to async utils
4 changes: 4 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
{
"label": "Async Batching Guide",
"to": "guides/async-batching"
},
{
"label": "Async Retrying Guide",
"to": "guides/async-retrying"
}
]
},
Expand Down
24 changes: 24 additions & 0 deletions docs/framework/react/reference/functions/pacerprovider.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
id: PacerProvider
title: PacerProvider
---

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

# Function: PacerProvider()

```ts
function PacerProvider(__namedParameters): Element
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:46](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L46)

## Parameters

### \_\_namedParameters

[`PacerProviderProps`](../../interfaces/pacerproviderprops.md)

## Returns

`Element`
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useAsyncBatcher<TValue, TSelected>(
selector): ReactAsyncBatcher<TValue, TSelected>
```

Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:167](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L167)
Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:168](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L168)

A React hook that creates an `AsyncBatcher` instance for managing asynchronous batches of items.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useAsyncDebouncer<TFn, TSelected>(
selector): ReactAsyncDebouncer<TFn, TSelected>
```

Defined in: [react-pacer/src/async-debouncer/useAsyncDebouncer.ts:149](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-debouncer/useAsyncDebouncer.ts#L149)
Defined in: [react-pacer/src/async-debouncer/useAsyncDebouncer.ts:150](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-debouncer/useAsyncDebouncer.ts#L150)

A low-level React hook that creates an `AsyncDebouncer` instance to delay execution of an async function.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/useasyncqueuer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useAsyncQueuer<TValue, TSelected>(
selector): ReactAsyncQueuer<TValue, TSelected>
```

Defined in: [react-pacer/src/async-queuer/useAsyncQueuer.ts:167](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-queuer/useAsyncQueuer.ts#L167)
Defined in: [react-pacer/src/async-queuer/useAsyncQueuer.ts:168](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-queuer/useAsyncQueuer.ts#L168)

A lower-level React hook that creates an `AsyncQueuer` instance for managing an async queue of items.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useAsyncRateLimiter<TFn, TSelected>(
selector): ReactAsyncRateLimiter<TFn, TSelected>
```

Defined in: [react-pacer/src/async-rate-limiter/useAsyncRateLimiter.ts:178](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-rate-limiter/useAsyncRateLimiter.ts#L178)
Defined in: [react-pacer/src/async-rate-limiter/useAsyncRateLimiter.ts:179](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-rate-limiter/useAsyncRateLimiter.ts#L179)

A low-level React hook that creates an `AsyncRateLimiter` instance to limit how many times an async function can execute within a time window.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useAsyncThrottler<TFn, TSelected>(
selector): ReactAsyncThrottler<TFn, TSelected>
```

Defined in: [react-pacer/src/async-throttler/useAsyncThrottler.ts:160](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-throttler/useAsyncThrottler.ts#L160)
Defined in: [react-pacer/src/async-throttler/useAsyncThrottler.ts:161](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-throttler/useAsyncThrottler.ts#L161)

A low-level React hook that creates an `AsyncThrottler` instance to limit how often an async function can execute.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/usebatcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useBatcher<TValue, TSelected>(
selector): ReactBatcher<TValue, TSelected>
```

Defined in: [react-pacer/src/batcher/useBatcher.ts:121](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/batcher/useBatcher.ts#L121)
Defined in: [react-pacer/src/batcher/useBatcher.ts:122](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/batcher/useBatcher.ts#L122)

A React hook that creates and manages a Batcher instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/usedebouncer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useDebouncer<TFn, TSelected>(
selector): ReactDebouncer<TFn, TSelected>
```

Defined in: [react-pacer/src/debouncer/useDebouncer.ts:102](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/debouncer/useDebouncer.ts#L102)
Defined in: [react-pacer/src/debouncer/useDebouncer.ts:103](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/debouncer/useDebouncer.ts#L103)

A React hook that creates and manages a Debouncer instance.

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

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

# Function: useDefaultPacerOptions()

```ts
function useDefaultPacerOptions(): PacerProviderOptions
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:68](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L68)

## Returns

[`PacerProviderOptions`](../../interfaces/pacerprovideroptions.md)
18 changes: 18 additions & 0 deletions docs/framework/react/reference/functions/usepacercontext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
id: usePacerContext
title: usePacerContext
---

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

# Function: usePacerContext()

```ts
function usePacerContext(): null | PacerContextValue
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:64](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L64)

## Returns

`null` \| `PacerContextValue`
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/usequeuer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useQueuer<TValue, TSelected>(
selector): ReactQueuer<TValue, TSelected>
```

Defined in: [react-pacer/src/queuer/useQueuer.ts:132](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/queuer/useQueuer.ts#L132)
Defined in: [react-pacer/src/queuer/useQueuer.ts:133](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/queuer/useQueuer.ts#L133)

A React hook that creates and manages a Queuer instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/useratelimiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useRateLimiter<TFn, TSelected>(
selector): ReactRateLimiter<TFn, TSelected>
```

Defined in: [react-pacer/src/rate-limiter/useRateLimiter.ts:141](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/rate-limiter/useRateLimiter.ts#L141)
Defined in: [react-pacer/src/rate-limiter/useRateLimiter.ts:142](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/rate-limiter/useRateLimiter.ts#L142)

A low-level React hook that creates a `RateLimiter` instance to enforce rate limits on function execution.

Expand Down
2 changes: 1 addition & 1 deletion docs/framework/react/reference/functions/usethrottler.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function useThrottler<TFn, TSelected>(
selector): ReactThrottler<TFn, TSelected>
```

Defined in: [react-pacer/src/throttler/useThrottler.ts:107](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/throttler/useThrottler.ts#L107)
Defined in: [react-pacer/src/throttler/useThrottler.ts:108](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/throttler/useThrottler.ts#L108)

A low-level React hook that creates a `Throttler` instance that limits how often the provided function can execute.

Expand Down
5 changes: 5 additions & 0 deletions docs/framework/react/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ title: "@tanstack/react-pacer"

## Interfaces

- [PacerProviderOptions](../interfaces/pacerprovideroptions.md)
- [PacerProviderProps](../interfaces/pacerproviderprops.md)
- [ReactAsyncBatcher](../interfaces/reactasyncbatcher.md)
- [ReactAsyncDebouncer](../interfaces/reactasyncdebouncer.md)
- [ReactAsyncQueuer](../interfaces/reactasyncqueuer.md)
Expand All @@ -22,6 +24,7 @@ title: "@tanstack/react-pacer"

## Functions

- [PacerProvider](../functions/pacerprovider.md)
- [useAsyncBatchedCallback](../functions/useasyncbatchedcallback.md)
- [useAsyncBatcher](../functions/useasyncbatcher.md)
- [useAsyncDebouncedCallback](../functions/useasyncdebouncedcallback.md)
Expand All @@ -38,6 +41,8 @@ title: "@tanstack/react-pacer"
- [useDebouncedState](../functions/usedebouncedstate.md)
- [useDebouncedValue](../functions/usedebouncedvalue.md)
- [useDebouncer](../functions/usedebouncer.md)
- [useDefaultPacerOptions](../functions/usedefaultpaceroptions.md)
- [usePacerContext](../functions/usepacercontext.md)
- [useQueuedState](../functions/usequeuedstate.md)
- [useQueuedValue](../functions/usequeuedvalue.md)
- [useQueuer](../functions/usequeuer.md)
Expand Down
120 changes: 120 additions & 0 deletions docs/framework/react/reference/interfaces/pacerprovideroptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
---
id: PacerProviderOptions
title: PacerProviderOptions
---

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

# Interface: PacerProviderOptions

Defined in: [react-pacer/src/provider/PacerProvider.tsx:19](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L19)

## Properties

### asyncBatcher?

```ts
optional asyncBatcher: Partial<AsyncBatcherOptions<any>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:20](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L20)

***

### asyncDebouncer?

```ts
optional asyncDebouncer: Partial<AsyncDebouncerOptions<AnyAsyncFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:21](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L21)

***

### asyncQueuer?

```ts
optional asyncQueuer: Partial<AsyncQueuerOptions<any>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:22](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L22)

***

### asyncRateLimiter?

```ts
optional asyncRateLimiter: Partial<AsyncRateLimiterOptions<AnyAsyncFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:23](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L23)

***

### asyncRetryer?

```ts
optional asyncRetryer: Partial<AsyncRetryerOptions<AnyAsyncFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:24](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L24)

***

### asyncThrottler?

```ts
optional asyncThrottler: Partial<AsyncThrottlerOptions<AnyAsyncFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:25](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L25)

***

### batcher?

```ts
optional batcher: Partial<BatcherOptions<any>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:26](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L26)

***

### debouncer?

```ts
optional debouncer: Partial<DebouncerOptions<AnyFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:27](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L27)

***

### queuer?

```ts
optional queuer: Partial<QueuerOptions<any>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:28](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L28)

***

### rateLimiter?

```ts
optional rateLimiter: Partial<RateLimiterOptions<AnyFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:29](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L29)

***

### throttler?

```ts
optional throttler: Partial<ThrottlerOptions<AnyFunction>>;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:30](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L30)
30 changes: 30 additions & 0 deletions docs/framework/react/reference/interfaces/pacerproviderprops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
id: PacerProviderProps
title: PacerProviderProps
---

<!-- DO NOT EDIT: this page is autogenerated from the type comments -->

# Interface: PacerProviderProps

Defined in: [react-pacer/src/provider/PacerProvider.tsx:39](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L39)

## Properties

### children

```ts
children: ReactNode;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:40](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L40)

***

### defaultOptions?

```ts
optional defaultOptions: PacerProviderOptions;
```

Defined in: [react-pacer/src/provider/PacerProvider.tsx:41](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/provider/PacerProvider.tsx#L41)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: ReactAsyncBatcher

# Interface: ReactAsyncBatcher\<TValue, TSelected\>

Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:10](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L10)
Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:11](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L11)

## Extends

Expand All @@ -27,7 +27,7 @@ Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:10](https://github
readonly state: Readonly<TSelected>;
```

Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:17](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L17)
Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:18](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L18)

Reactive state that will be updated and re-rendered when the batcher state changes

Expand All @@ -41,7 +41,7 @@ Use this instead of `batcher.store.state`
readonly store: Store<Readonly<AsyncBatcherState<TValue>>>;
```

Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:23](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L23)
Defined in: [react-pacer/src/async-batcher/useAsyncBatcher.ts:24](https://github.com/TanStack/pacer/blob/main/packages/react-pacer/src/async-batcher/useAsyncBatcher.ts#L24)

#### Deprecated

Expand Down
Loading
Loading