Skip to content
Discussion options

You must be logged in to vote

You should be using useSWR("/api/foo", fetcher).
The / at the very beginning is important as it signals to the browser to start from the root of the website, not from wherever your path happens to be.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@leo-fe99
Comment options

Answer selected by leo-fe99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants