Module NextJS
Provides classes and predicates modeling Next.js.
Import path
import javascript
Predicates
apiFolder | Gets a folder that contains API endpoints for a Next.js application. These API endpoints act as Express-like route-handlers. |
getAModuleWithFallbackPaths | Gets a module inside a “pages” folder where |
getANextPackage | Gets a |
getAPagesFolder | Gets a “pages” folder in a |
getAPagesModule | Gets a module corrosponding to a |
getAPropsSource | Gets a reference to a |
getInitialProps | Gets the |
getServerSidePropsFunction | Gets the |
getStaticPropsFunction | Gets the |
nextRouter | Gets a reference to a Next.js router. |
Classes
NextApiRouteHandler | A Next.js route handler for an API endpoint. The response (res) includes a set of Express.js-like methods, and we therefore model the routehandler as an Express.js routehandler. |
NextHttpRequestSource | A NodeJS HTTP request object in a Next.js page. |
NextHttpResponseSource | A NodeJS HTTP response object in a Next.js page. |
NextHttpRouteHandler | A Next.js function that is exected on the server for every request, seen as a routehandler. |
NextJSStaticPropsStep | A step modeling the flow from the server-computed props object to the default exported function that renders the page. |
NextJSStaticReactComponentPropsStep | A step modeling the flow from the server-computed props object to the default exported React component that renders the page. |
NextParams | A user defined path or query parameter in |
NextReqResHandler | A function that handles both a request and response from Next.js, seen as a routehandler. |