[go: up one dir, main page]

Skip to content
View sparker888's full-sized avatar
:octocat:
:octocat:

Highlights

  • Pro

Block or report sparker888

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
sparker888/README.md

Featured Image

Welcome to my personal site repo for sparker888!

I built it with Next.js 13's new project structure and server components

Next.js 13 introduces the app directory, changing how we create pages and layouts.

Key Features

  • Routing: Define pages in page.js, and layouts in layout.js.
  • Server Components: By default, for better performance.
  • Error and Loading States: Managed by error.js and loading.js.

Page and Layout

  • app/page.js: Defines the UI for the root route /.
  • app/layout.js: Contains shared UI like headers or sidebars.

Site Blog Articles

  • 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

Error Handling

  • app/some-directory/error.js: Manages errors within its directory.

Data Fetching

  • Perform directly inside page components using the Fetch API.

Newsletter Signup Feature

  • Client-Side Component: Used use client directive in Newsletter.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.

Image Gallery

Launch Your Own Project!

To set up a new Next.js 13 project:

  1. npx create-next-app@latest my-app
  2. Modify next.config.js to enable the app directory.
  3. 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.

Pinned Loading

  1. sparker888 sparker888 Public

    sparker888's personal site repository

    JavaScript

  2. gatsby-tailwind-starter gatsby-tailwind-starter Public

    @sparker888's personal Gatsby starter created in 2022 (still works as of 2024)

    JavaScript 1

  3. surfing-image-gallery surfing-image-gallery Public

    Next image gallery for @sparker888 - Surfing

    TypeScript

  4. gogravital gogravital Public

    Current repo for gravitaldigital.com

    JavaScript 1

  5. eve_ships eve_ships Public

    Ship descriptions for Eve Online

    HTML 1