All posts with the tag "nextjs".
Using Next.js API routesPosted on:December 3, 2020 at 10:00 PM
Next.JS comes with a useful feature out of the box, api routes. Files created in the `pages/api/` folder are treated as an endpoint rather than a page. Instead of exporting a React component to display your UI, you can export a function returning, say, a JSON response.