当我点击这个网址https://www.cordly.io?fpr=morten48的查询参数fpr=marten48自动从标题中删除,我怎么能防止呢?
yhqotfr81#
我假设您使用的是带有app dir的Next 13。在这种情况下,您很可能面临这个issue。您可以通过在页面上添加“force-dynamic”来修复它。
// Add this line to fix the query params issue export const dynamic='force-dynamic'; export default function Page(props) { return ( <div> {JSON.stringify(props.searchParams, null, 2)} </div> ) }
1条答案
按热度按时间yhqotfr81#
我假设您使用的是带有app dir的Next 13。在这种情况下,您很可能面临这个issue。
您可以通过在页面上添加“force-dynamic”来修复它。