# Events

You can subscribe to SDK events through component props or programmatically via the `ref`.

| Event                | Description                                      |
| -------------------- | ------------------------------------------------ |
| `onReady`            | Fired when the SDK is initialized and ready      |
| `onConsentChanged`   | Fired whenever the user’s consent status changes |
| `onNoticeShown`      | Fired when the notice is displayed               |
| `onNoticeHidden`     | Fired when the notice is closed                  |
| `onPreferencesShown` | Fired when the preferences dialog is displayed   |
| `onPreferencesSaved` | Fired when preferences are saved                 |


---

# 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://developers.didomi.io/cmp/mobile-sdk/vega-os/reference/events.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.
