# NextJS Link not Updating \`BuilderContent\`

**URL:** <https://forum.builder.io/t/nextjs-link-not-updating-buildercontent/4813>\
**Category:** Technical Questions\
**Tags:** nextjs\
**Created:** [January 17, 2024, 6:40pm UTC](https://forum.builder.io/t/nextjs-link-not-updating-buildercontent/4813 "2024-01-17T18:40:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kacey](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@kacey](https://forum.builder.io/u/kacey)\
**Post date:** [January 17, 2024, 6:40pm UTC](https://forum.builder.io/t/nextjs-link-not-updating-buildercontent/4813/1 "2024-01-17T18:40:16Z")

</div>

_Please fill out as many of the following questions as possible so we can help you promptly! If you don’t know how to answer or it does not apply, feel free to remove it or leave it blank._

**Builder content link**  
_e.g. [Builder.io: Visual Development Platform](http://builder.io/content/4cab34394e684fe7b93d6ef5493a8a51)_  
[Builder.io: Visual Development Platform](https://builder.io/content/9a9ae051e23743dfaca3c3e20de848b4)

**Builder public api key**  
_go to [Builder.io: Visual Development Platform](https://builder.io/account/organization) and copy your PUBLIC api key_  
e2f096ba17f74dfd9c140ac050f349a4

**What are you trying to accomplish**  
_e.g. I want to integrate builder on a landing page_  
When using the NextJS `Link` component with the `pages` router, I want the `BuilderContent` component to update appropriately. Currently, it does not update when I change within the same page; i.e. I go from `/blog/post-1` to `/blog/post-2` and `getStaticParams` returns correctly the data for `post-2` but `BuilderContent` keeps the content from `post-1`.

If I hard refresh the page, it returns the correct data populated from `getStaticProps` but with the SPA routing once the NextJS app loads, its not.

**Code stack you are integrating Builder with**  
_e.g. NextJS, react, Shopify_  
NextJS

**Reproducible code example**  
_If you are having integration errors, please link to codesandbox or copy and paste your problematic code here. The more detail the better!_

I left some comments using the post example above and where data is returned correctly and incorrectly.

```tsx
  console.log('article', article); // This is logging correct data, i.e. `post-2` data

  return (
    // Wrapping the structured data in BuilderContent allows
    // it to update in real time as your custom fields are edited in the
    // Visual Editor
    <BuilderContent
      content={article}
      options={{
        options: {
          includeRefs: true,
          includeUnpublished: true,
        },
        enrich: true,
        // userAttributes: {
        // urlPath: `/blog-v2/${article.slug}`,
        // },
        query: {
          data: {
            slug: router.query.slug,
          },
        },
      }}
      model="blog-article"
    >
      {(resolvedData, loading, fullData) => {
        if (loading) return;
        // console.log('fullData', fullData);
        // console.log('resolvedData', resolvedData);
        // console.log('isPreviewing', isPreviewing);
        const data = resolvedData;
        console.log('data', data, fullData); // This is logging old data i.e. post-1 data
  }
...

```

---

<div class="post-metadata">

**Author:** ![kacey](https://avatars.discourse-cdn.com/v4/letter/k/0ea827/32.png) [@kacey](https://forum.builder.io/u/kacey)\
**Post date:** [January 17, 2024, 8:22pm UTC](https://forum.builder.io/t/nextjs-link-not-updating-buildercontent/4813/2 "2024-01-17T20:22:13Z")

</div>

> [@kacey](#):
>
> does not update when I change within the same page; i.e. I go from `/blog/post-1` to `/blog`

As a work around, for now I have been using the `inline` prop to overwrite when not previewing:

```auto

      inline={!isPreviewing}

```

---

<div class="post-metadata">

**Author:** ![anon43891756](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@anon43891756](https://forum.builder.io/u/anon43891756)\
**Post date:** [February 1, 2024, 12:01pm UTC](https://forum.builder.io/t/nextjs-link-not-updating-buildercontent/4813/3 "2024-02-01T12:01:22Z")

</div>

Hi @kacey ,

Since you’re using `enrich:true` I would recommend not using includeRefs entirely. Please make this adjustment and check if it resolves the issue you are facing.
