one catch: pushState only updates the URL, it doesn't fetch anything. so this works when the data for that id is already on the client. if the id drives a server fetch, this isn't your fix.
here's the doc: https://t.co/CF6blqLRID
ever struggled with router.push() in nextjs? the rsc payload taking more time than you'd like? but you also want URL-driven navigation like baseURL/chat?id=xyz where the id changes the page and data for the user on their actions, and you're getting this delay on router.push
one good solution can be the browser's native window.history.pushState, supported in next from 14.1 onwards. Read the id back with useSearchParams in a client component and it's all client and snappy โ and yes, you do want a proper Suspense boundary around that/
@winterwaltzzz do you have that tendency to fumble a girl above your league while youre way good with equal and below league? just curious if i have a problem
dont get me wrong...i respect and fear God, but i feel having all that power to change everything he still lets us born into this misery, dwell into this meaningless short time just to die. theres no point at all.