# Pagnated Queries Topic - react-course-part2-starter

**URL:** <https://forum.codewithmosh.com/t/pagnated-queries-topic-react-course-part2-starter/25719>\
**Category:** React\
**Created:** [March 19, 2024, 4:08pm UTC](https://forum.codewithmosh.com/t/pagnated-queries-topic-react-course-part2-starter/25719 "2024-03-19T16:08:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbenson001](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jbenson001](https://forum.codewithmosh.com/u/jbenson001)\
**Post date:** [March 19, 2024, 4:08pm UTC](https://forum.codewithmosh.com/t/pagnated-queries-topic-react-course-part2-starter/25719/1 "2024-03-19T16:08:52Z")

</div>

I have been following along with the course and got to this section. Everything was working fine until Mosh go to the part about not having the page scroll while paging. I tried to add the "keepPreviousData: true as he did in the code, but it just keeps giving me an syntax error

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/6/6c7f15c88b3628b4fbccfadcb95a7c1348660879.png)

I am not sure why this is happening and I cannot get it resolved. Is there any place to get this code from Git? It seems he has only committed the original code and not as he is going through the course. If someone can provide the code, that would be fine too. I just want to move on and this is very annoying. Thank you

---

<div class="post-metadata">

**Author:** ![jbenson001](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@jbenson001](https://forum.codewithmosh.com/u/jbenson001)\
**Post date:** [March 19, 2024, 8:25pm UTC](https://forum.codewithmosh.com/t/pagnated-queries-topic-react-course-part2-starter/25719/2 "2024-03-19T20:25:37Z")

</div>

After wasting many hours, and not getting an answer here, I found an answer that seems to work, Instead of ` keepPreviousData: true,`  
use ` placeholderData: keepPreviousData,`

I found this on a GitHub forum

While this lesson now works, the next lesson using UseInfiniteQuery() throws the same error and does not work at all
