# @elementor/query

> Wrapper around `@tanstack/react-query`

Latest version **4.2.4** (published 2026-08-31) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install @elementor/query
pnpm add @elementor/query
yarn add @elementor/query
bun add @elementor/query
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.2.4 |
| Published | 2026-08-31 |
| First published | 2023-06-28 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7071 |
| Author | Elementor Team |
| Maintainers | kingyes, mati1000, nevoss, chene, cloud-devops |

## Links

- npm: https://www.npmjs.com/package/@elementor/query
- Repository: https://github.com/elementor/elementor
- Homepage: https://elementor.com/
- Issues: https://github.com/elementor/elementor/issues
- npm.io page: https://npm.io/package/@elementor/query

## Dependencies (1)

- [@tanstack/react-query](https://npm.io/package/@tanstack/react-query.md) ^5.62.3

## Recent versions

- 4.2.4 (latest) — 2026-08-31
- 4.4.0-1081 (build) — 2026-09-10
- 4.3.0-beta2 (beta) — 2026-09-08
- 4.2.0-beta1 (4.2-beta1) — 2026-06-25
- 4.1.0-manual (manual) — 2026-04-20
- 4.4.0-1080 — 2026-09-09
- 4.4.0-1079 — 2026-09-07
- 4.4.0-1078 — 2026-09-07
- 4.4.0-1077 — 2026-09-07
- 4.4.0-1076 — 2026-09-07
- 4.4.0-1075 — 2026-09-07
- 4.4.0-1074 — 2026-09-06
- 4.4.0-1073 — 2026-09-03
- 4.4.0-1072 — 2026-09-03
- 4.4.0-1071 — 2026-09-02
- … 975 more at https://npm.io/package/@elementor/query/versions

## README

# Query

This package is a wrapper around `@tanstack/react-query` in order to easily expose it in the Editor.

For more information about `@tanstack/react-query` please refer to the [official documentation](https://tanstack.com/query/v4/docs/react/overview).

> [!WARNING]
> Please refrain from accessing or depending on functions and variables starting with double underscores, as they are subject to change without notice.
> Naming convention involving double underscores (`__`) as a prefix to indicate that a function or variable is meant for internal use and should not be accessed or relied upon by third-party developers.

## Usage

```tsx
import { createQueryClient, QueryClientProvider, useQuery } from '@elementor/query';

const queryClient = createQueryClient();

const App = () => (
	<QueryClientProvider client={ queryClient }>
		<MyComponent />
	</QueryClientProvider>
);

const MyComponent = () => {
	const { data: todos, isLoading } = useQuery( {
		queryKey: 'todos',
		queryFn: () => fetch( '/todos' ).then( ( res ) => res.json() ),
	} );
	
	if ( isLoading ) {
		return <div>Loading...</div>;
	}
	
	return todos.map( /* ... */ );
};
```

---
_Source: https://npm.io/package/@elementor/query · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
