Skip to content

Feature: Add Astro 6 support to @keystatic/astro #1515

@HoukasaurusRex

Description

@HoukasaurusRex

Summary

@keystatic/astro@5.0.6 currently declares peerDependencies: { astro: "2 || 3 || 4 || 5" }, which means it does not support Astro 6.

When used with Astro 6, the Keystatic admin UI crashes with React hook errors:

TypeError: Cannot read properties of null (reading 'useState')
    at exports.useState
    at Keystatic

This appears to be caused by Astro 6 changes in how React islands are rendered/hydrated, resulting in Keystatic's React components running outside a proper React context tree.

Environment

  • @keystatic/astro: 5.0.6
  • @keystatic/core: 0.5.48
  • astro: 6.0.4
  • react: 19.2.4
  • react-dom: 19.2.4

Workaround

Downgrading to Astro 5 resolves the issue since @keystatic/astro supports Astro 2-5.

Expected Behavior

@keystatic/astro should support Astro 6 and render the admin UI without React hook errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions