Now, let's create the first page and place it in the pages folder:
// pages/index.js
import React from "react";
export default () => (<div>Hello, World!</div>);
Now, if you run the dev server (npm start) and visit http://localhost:3000, you will see this page:
![](https://static.packt-cdn.com/products/9781788993661/graphics/assets/4832c32e-6c16-4de6-a1a5-95760775af96.png)
Now, let's see how Next.js handles errors in your files:
// pages/index.js
import React from "react";
export default () => (<div><p>Hello, World!</div>);
// ^ here we purposely not closing this tag
Then, reload the page to see this:
![](https://static.packt-cdn.com/products/9781788993661/graphics/assets/0ee0bb3b-335d-48d5-b107-bb75f4fbc1c8.png)