In Blitz, a page is a React Component exported from a .js
, .jsx
, .ts
, or .tsx
file in a pages directory. Each page is associated with a route based on its file name.
Example: if you create a file under app/pages/post
like below, it will be accessible at /about
const Post = () => {
return (
<div>
<h1>Hello World</h1>
</div>
)
}
export default Post
Unlike Next.js, you can have many pages/
folders nested inside app/
. This way pages can be organized neatly, especially for larger projects.