Javascript – Fetch API route in /app folder in Next JS 13
I'm trying to create an API and fetch data in Next JS 13. I've read this question: How do you put api routes in the new app folder of Next.js? and came up with these: /src/app/hooks/useLocation.ts: export const getUserLocation =…