📜  react ctx - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:20.427000             🧑  作者: Mango

代码示例1
ctx is a NextJS artifact.

ctx is a context object containing those properties (Source):

pathname - path section of URL
query - query string section of URL parsed as an object
asPath - String of the actual path (including the query) shows in the browser
req - HTTP request object (server only)
res - HTTP response object (server only)
err - Error object if any error is encountered during the rendering