Skip to content

Distinguish between client- and server-side call of getServerSideProps #12240

Answered by claus
stigkj asked this question in Help
Discussion options

You must be logged in to vote

This is more or less how Next does it internally:

const isClientSide = url.parse(req.url).pathname.match(/_next\/data/);

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by stigkj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants