# App Context

The AppContext is a higher-order component (HOC) that stores global objects and methods used throughout your application, such as:

* user credentials&#x20;
* [authentication methods](/gravity-native/authentication.md) (sign in, authorizeUser, signout)
* [notification banner](/gravity-native/components/notification.md) methods (show, hide)
* [modal](/gravity-native/components/modal.md) methods (show, hide)
* [handling errors](/gravity-native/handling-errors.md)

{% hint style="info" %}
The AppContext is located in **`/components/app`**
{% endhint %}

You can then use any of these methods anywhere in your application by importing the `AppContext` into your components.

```javascript
import { useContext } from 'react';
import { AppContext } from '~/components/lib'

export function Profile(props){

  const context = useContext(AppContext);
  context.handleError(err);

}
```


---

# 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://docs.usegravity.app/gravity-native/app-context.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.
