---
url: >-
  https://game-engine-io.github.io/enginex-frontend-sdk/reference/api/@getenginex/sdk-react/functions/useEnginexQueries.md
---
[Reference](../../../index.md) / [@getenginex/sdk-react](../index.md) / useEnginexQueries

# useEnginexQueries()

## Call Signature

> **useEnginexQueries**(): [`CoreQueries`](../../sdk/query/interfaces/CoreQueries.md)

Core query factories, memoized per client: the same object across renders while the [EnginexProvider](EnginexProvider.md)
client stays the same. Each call (`q.wallet.getBalance()`) returns the options
with the user key **as of the call**; call it on every render (as in the example) so the
key follows a user switch, instead of storing the result.

With `(factory, product)` it returns the factories of a product package (see the other signature).

### Returns

[`CoreQueries`](../../sdk/query/interfaces/CoreQueries.md)

The core query factories.

### Throws

If called outside an `EnginexProvider`.

### Example

```ts
const q = useEnginexQueries()
const balance = useEnginexQuery(q.wallet.getBalance(), { refetchInterval: 10_000 })
```

## Call Signature

> **useEnginexQueries**<`P`, `Q`>(`factory`, `product`): `Q`

Query factories of a product package (`createIgamingQueries`, `createPredictionsQueries`),
memoized per `factory` and `product`: the same object across renders while both stay the same.
As in the core, call each factory on every render.

### Type Parameters

#### P

`P`

#### Q

`Q`

### Parameters

#### factory

(`product`) => `Q`

Product factory, e.g. `createIgamingQueries`.

#### product

`P`

The product object, e.g. the one returned by `createIgaming(enginex)`.

### Returns

`Q`

The product query factories.

### Throws

If called outside an `EnginexProvider`.

### Example

```ts
const ig = useEnginexQueries(createIgamingQueries, igaming)
const games = useEnginexQuery(ig.casino.listGames({ page: 1 }))
```
