# How to update the value of component when in SPA page mode?

**URL:** <https://forum.builder.io/t/how-to-update-the-value-of-component-when-in-spa-page-mode/3943>\
**Category:** General\
**Tags:** qwik\
**Created:** [July 25, 2023, 10:21am UTC](https://forum.builder.io/t/how-to-update-the-value-of-component-when-in-spa-page-mode/3943 "2023-07-25T10:21:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arachi004](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@arachi004](https://forum.builder.io/u/arachi004)\
**Post date:** [July 25, 2023, 10:21am UTC](https://forum.builder.io/t/how-to-update-the-value-of-component-when-in-spa-page-mode/3943/1 "2023-07-25T10:21:45Z")

</div>

Hello.

I create **Pagination Component** in my project. Link in pagination use component **Link** from **@builder.io/qwik-city** , so it’s make my page **SPA**.  
when I move page from 1 to 2, the data in my component is not updated. It looks the same as on page 1.  
I have to refresh or reload to see the results of changes to the component

My code look like this:

```auto
// ~/components/base/mainlist.tsx
import Pagination from "~/components/other/pagination";

export default component$(({data, title, style, currentPage}: {data: MainPageData, title: string, style: number, currentPage: number}) => {
//some variable declaration
return (
<>
// some code HTML
<Pagination current={currentPage} max={data.pages.max} slug={slug} />
</>
)

```

I also try use useLoaction but no effect at all

```auto
{!loc.isNavigating && <Pagination current={currentPage} max={data.pages.max} slug={slug} />}

```

I use mainlist.tsx in my page

```auto
// router/latest-update/index.tsx
export default component$(() => {
    const data = useGetData().value.data // get data from API
    return (
        <main>
            <div class="max-w-6xl mx-auto relative z-10">
                <div id="content" class="mt-5 relative p-2.5 md:p-14 pt-0 overflow-hidden">
                    <div id="postbody" class="float-left w-full md:w-3/4">
                        <div class="md:pr-5">
                            <Headpage site_name={"Latest Update"} description={`description`} />
                            <Mainlist data={data} title="Table of Contents" style={1} currentPage={data.pages.current} />
                        </div>
                    </div>
                    <Sidebar data={data.sidebar} />
                </div>
            </div>
        </main>
    )
})

```

---

<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:** [July 26, 2023, 8:32am UTC](https://forum.builder.io/t/how-to-update-the-value-of-component-when-in-spa-page-mode/3943/2 "2023-07-26T08:32:43Z")

</div>

Hi @arachi004, Welcome to the [Builder.io](http://Builder.io) Forum!

**To reach out to the Qwik open source project teams** , please head over to our [Discord](https://qwik.builder.io/chat) and join the discussion there.
