为什么我的 URL 页面值没有更新?

问题描述 投票:0回答:1

不知何故,我无法将我的反应代码粘贴到这里,所以我附加了图像。

I want to fetch new movies data by updating the value of page from 1 to 2 and so on whenever user reach at the end of page. Everything working fine, page value is updating correctly but my URL still taking value 1 and fetching data for same page 1.

reactjs rest react-hooks state
1个回答
0
投票

阅读 urlSeachParamas 文档来设置你的 url https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[在此处输入链接描述]1

© www.soinside.com 2019 - 2024. All rights reserved.