Skip to content

docs: fix LazyInfiniteQueryTrigger docs#5261

Open
lilianakatrina684-a11y wants to merge 2 commits into
reduxjs:masterfrom
lilianakatrina684-a11y:docs-lazy-infinite-query-trigger
Open

docs: fix LazyInfiniteQueryTrigger docs#5261
lilianakatrina684-a11y wants to merge 2 commits into
reduxjs:masterfrom
lilianakatrina684-a11y:docs-lazy-infinite-query-trigger

Conversation

@lilianakatrina684-a11y

Copy link
Copy Markdown

Summary

  • fix the copied LazyInfiniteQueryTrigger docs so the second argument is documented as a direction, not preferCacheValue
  • add an explicit useInfiniteQuerySubscription signature to the generated hooks docs
  • keep the source JSDoc and rendered docs aligned so the incorrect description does not come back

Closes #5229

@codesandbox

codesandbox Bot commented Mar 21, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codesandbox-ci

codesandbox-ci Bot commented Mar 21, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f4a9b09:

Sandbox Source
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration
rtk-esm-cra Configuration

@aryaemami59 aryaemami59 added Documentation Improvements or additions to documentation RTK-Query Issues related to Redux-Toolkit-Query labels Mar 24, 2026
@aryaemami59 aryaemami59 changed the title docs: fix LazyInfiniteQueryTrigger docs docs: fix LazyInfiniteQueryTrigger docs Mar 24, 2026
@netlify

netlify Bot commented Apr 4, 2026

Copy link
Copy Markdown

Deploy Preview for redux-starter-kit-docs ready!

Name Link
🔨 Latest commit f4a9b09
🔍 Latest deploy log https://app.netlify.com/projects/redux-starter-kit-docs/deploys/69d0670556eab40008e78e0f
😎 Deploy Preview https://deploy-preview-5261--redux-starter-kit-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +803 to +807
* Pass the endpoint argument as the first parameter and either `'forward'` or `'backward'`
* as the second parameter to fetch the next or previous page from the current cache entry.
*
* @remarks
* If you need to access the error or success payload immediately after a lazy query, you can chain .unwrap().
* If you need to access the error or success payload immediately after triggering the request, you can chain `.unwrap()`.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Pass the endpoint argument as the first parameter and either `'forward'` or `'backward'`
* as the second parameter to fetch the next or previous page from the current cache entry.
*
* @remarks
* If you need to access the error or success payload immediately after a lazy query, you can chain .unwrap().
* If you need to access the error or success payload immediately after triggering the request, you can chain `.unwrap()`.
* @param arg - The query argument identifying the infinite query cache entry.
* @param direction - The {@linkcode InfiniteQueryDirection | direction} to fetch: **`'forward'`** fetches the next page, and **`'backward'`** fetches the previous page.
* @returns A {@linkcode InfiniteQueryActionCreatorResult | promise-like result object} for the triggered request. Chain {@linkcode InfiniteQueryActionCreatorResult.unwrap | .unwrap()} to access the fulfilled payload or throw the rejected error.

> = {
/**
* Triggers a lazy query.
* Triggers an infinite query fetch in the given direction.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Triggers an infinite query fetch in the given direction.
* Triggers fetching the next or previous page of an infinite query.

@aryaemami59 aryaemami59 added the Needs Feedback More input is needed before moving forward. label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements or additions to documentation Needs Feedback More input is needed before moving forward. RTK-Query Issues related to Redux-Toolkit-Query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(toolkit): fix LazyInfiniteQueryTrigger docs

2 participants