Company
Date Published
Author
Cassidy Williams
Word count
239
Language
English
Hacker News points
None

Summary

Shallow routing in Next.js allows for changing website URLs without re-running data fetching methods again, making it useful for adding query strings or routes that change based on user behavior. To use shallow routing, the `useRouter` hook is used with `{ shallow: true }` added to router push commands. This technique can be applied manually by developers to improve performance and reduce database queries in their applications.