# v15

### useActions

Due to an open issue in TypeScript, Decorators behave differently in **ES2022** (<https://github.com/microsoft/TypeScript/issues/51570>). That's why it is not possible to use [useActions ](/ngrx-ducks/ngrx-ducks-core/architecture/getactions.md)inside a StoreChunk initizilizing a static field of that class.

Currently, we do not know if the issue is a bug or a planned breaking changed. Once there is an update, we will update the documentation accordingly.

```typescript
import {
  useActions,
  StoreChunk
} from '@ngrx-ducks/core';

@StoreChunk()
export class Chunk {
  static actions = useActions(Chunk); // ❌ Will throw a runtime error, because Chunk is undefined at this point.
}
```

This means inlining `useActions` is not possible at the moment.

To resolve this issue, you need to move `useActions` outside your Chunk.

```typescript
mport {
  useActions,
  StoreChunk
} from '@ngrx-ducks/core';

@StoreChunk()
export class Chunk { }

export const chunkActions = useActions(Chunk); // ✅
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://co-it.gitbook.io/ngrx-ducks/migrations/v15.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
