Skip to content

ajphilton/nextjs-starter-medusa-react18

Repository files navigation

React 18 Safe Fork of Medusa’s Next.js Starter

This is an unofficial compatibility fork of the official Medusa Next.js storefront, adapted to run fully on React 18.

PRs welcome! Discord Chat Follow @medusajs

About This Fork

This repository is a React 18–safe version of the official
medusajs/nextjs-starter-medusa.

The upstream starter currently depends on React 19 RC features (useActionState) and Algolia InstantSearch, which break builds for users who must stay on stable React 18.

This fork provides:

  • Stable React 18.2 + ReactDOM 18.2
  • Removal of React 19 useActionState
  • Migration to useState + useTransition
  • Removal of Algolia + react-instantsearch-hooks-web
  • Clean TypeScript toolchain
  • Verified working build (yarn build) and server boot (yarn start)

Useful for:

  • Production storefronts requiring React 18 stability
  • Teams migrating incrementally toward React 19
  • Anyone blocked by RC-only hooks or Algolia peer dependencies

Overview

The Medusa Next.js Starter is built with:

Features include:

  • Full ecommerce support:
    • Product Detail Page
    • Product Overview Page
    • Product Collections
    • Cart
    • Checkout with Stripe
    • User Accounts
    • Order Details
  • Full Next.js 15 support:
    • App Router
    • Next fetching/caching
    • Server Components
    • Server Actions
    • Streaming
    • Static Pre-Rendering

Quickstart

Setting up the environment variables

Navigate into your projects directory and get your environment variables ready:

cd nextjs-starter-medusa/
mv .env.template .env.local

Install dependencies

Use Yarn to install all dependencies.

yarn

Start developing

You are now ready to start up your project.

yarn dev

Open the code and start customizing

Your site is now running at http://localhost:8000!

Payment integrations

By default this starter supports the following payment integrations

To enable the integrations you need to add the following to your .env.local file:

NEXT_PUBLIC_STRIPE_KEY=<your-stripe-public-key>

You'll also need to setup the integrations in your Medusa server. See the Medusa documentation for more information on how to configure Stripe.

Resources

Learn more about Medusa

Learn more about Next.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 49