# Customize Remix AppLoadContext type

Used: @remix-run/cloudflare@2.0.0, @remix-run/node@2.0.0, @remix-run/server-runtime@2.0.0, and @remix-run/deno@2.0.0

If you're using the `getLoadContext` function in your HTTP servers to pass data to your Remix app, you may notice that the `context` object is missing the properties you're setting.

For example, if you do the following:

```ts {% path="server.ts" %}
createRequestHandler({
  build: require("./build"),
  mode: process.env.NODE_ENV,
  getLoadContext(request) {
    return { name: "World" };
  },
});
```

And then, in your Remix loaders or actions, try to access `name`.

```tsx {% path="app/routes/something.tsx" %}
export async function loader({ context: { name } }: LoaderFunctionArgs) {
  // code here
}
```

You will notice that `name` is not typed correctly.

To fix that, you must overwrite the `AppLoadContext` type that Remix defines to what your `getLoadContext` sets.

```ts {% path="types/app.d.ts" %}
import "@remix-run/server-runtime";

declare module "@remix-run/server-runtime" {
  export interface AppLoadContext {
    name: string;
  }
}
```

Put that TS code in a file your app imports, for example, in `remix.env.d.ts`, and now the type of `name` will be the expected one.