Git Product home page Git Product logo

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.

Stephen Parker's Projects

pcdm icon pcdm

Parent Child Data Modeling Workshops

pcdm2 icon pcdm2

Parent Child Data Modeling Workshop Part 2

stickylife-nav icon stickylife-nav

This is the updated navigation that works in Node.js (Gatsby continues to throw an error on resize to mobile).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.