Next.js Discord

Discord Forum

Can you specify that a dynamic route doesn't need to hit the server when the slug changes?

Unanswered
European hornet posted this in #help-forum
Open in Discord
European hornetOP
I have a route /users/[id] where the id represents the id of the user...however I actually grab all the available users in the /users layout file, and I was hoping to get the user from that data rather than make a trip to the server...I understand the data will be cached in the Data-Cache but it would still require a trip to the server to render it...is there any way to specify that the /users/[id] route can be handled just in the client every time the id changes?

0 Replies