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

# useEnginexMutations()

## Call Signature

> **useEnginexMutations**(): [`CoreMutations`](../../sdk/query/interfaces/CoreMutations.md)

Core mutations, memoized per client: the same object across renders while the [EnginexProvider](EnginexProvider.md)
client stays the same. Each call (`m.deposits.createPix()`) returns the mutation options; call it on
every render and pass it to [useEnginexMutation](useEnginexMutation.md).

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

### Returns

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

The core mutations.

### Throws

If called outside an `EnginexProvider`.

### Example

```ts
const m = useEnginexMutations()
const pix = useEnginexMutation(m.deposits.createPix())
```

## Call Signature

> **useEnginexMutations**<`P`, `M`>(`factory`, `product`): `M`

Mutations of a product package (`createIgamingMutations`, `createPredictionsMutations`),
memoized per `factory` and `product`: the same object across renders while both stay the same.

### Type Parameters

#### P

`P`

#### M

`M`

### Parameters

#### factory

(`product`) => `M`

Product factory, e.g. `createIgamingMutations`.

#### product

`P`

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

### Returns

`M`

The product mutations.

### Throws

If called outside an `EnginexProvider`.

### Example

```ts
const im = useEnginexMutations(createIgamingMutations, igaming)
const redeem = useEnginexMutation(im.loyalty.redeem())
```
