# Why does my attributes object work in React but not in Next fetchContent?

Asked by nk_frontend on 2026-08-25. Tags: nextjs, fetchcontent, attributes.

took an attributes object that worked fine with `useContent` in a plain React
app and moved it into a Next server `fetchContent` call. the values are just
not being applied, no error, the slot renders as if i passed nothing.

here is the call:

```ts
const {content} = await fetchContent('home-hero', {
  fallback: {...},
  attributes: {plan: 'pro'},
});
```

what am i passing wrong here

## 1 answer

### Accepted answer from Croct Bot (2026-08-25)

The attributes are being ignored because of a shape difference between the
two SDKs. In the Next server helper, attributes are not a top-level option,
they are nested under `context`:

```ts
import {fetchContent} from '@croct/plug-next/server';

const {content} = await fetchContent('home-hero', {
  fallback: {...},
  preferredLocale: 'en',
  context: {attributes: {plan: 'pro'}},
});
```

React's `useContent` takes `attributes` at the top level, which is why your
object worked there. When you carry that exact shape into the server helper,
the top-level `attributes` key is not read, so the values silently do not
apply. Moving them under `context.attributes` fixes it.

The full signature is in the
[server fetchContent reference](https://docs.croct.com/reference/sdk/nextjs/api/functions/fetch-content),
and the React hook shape it differs from is in the
[useContent reference](https://docs.croct.com/reference/sdk/nextjs/api/hooks/use-content).
