Welcome to my personal site repo for sparker888!
Featuring an animated hero section showcasing the solopreneur journey from Space Coast to Ecuador.
Next.js 13 introduced the app
directory, changing how we create pages and layouts.
- Routing: Define pages in
page.js
, and layouts inlayout.js
. - Server Components: By default, for better performance.
- Error and Loading States: Managed by
error.js
andloading.js
. - Animated Hero Section: Dynamic home animation showcasing the remote solopreneur lifestyle.
app/page.js
: Defines the UI for the root route/
.app/layout.js
: Contains shared UI like headers or sidebars.
- Articles use
@next/mdx
package that enables the use of Markdown with JSX - Pages are created dynamically within the
/app
directory of the project - Works with Server Components, which is the default in the App Router
app/some-directory/error.js
: Manages errors within its directory.
- Perform directly inside page components using the Fetch API.
- Client-Side Component: Used
use client
directive inNewsletter.jsx
to handle form interactivity. - Form Handling: Utilized controlled form inputs with React state for email collection.
- API Integration: Connected with Netlify functions for email subscription.
- User Feedback: Implemented dynamic messaging to confirm subscription status.
- The image galleries are built with Next.js & Cloudinary
- You an view the repo at surfing-image-gallery
To set up a new Next.js project:
npx create-next-app@latest my-app
- Modify
next.config.js
to enable theapp
directory. - Delete
pages/index.js
to avoid conflicts.
For more detailed instructions and examples, refer to the official Next.js documentation and this comprehensive DEV Community guide.