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.
Summary
@keystatic/astro@5.0.6currently declarespeerDependencies: { 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:
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.48astro: 6.0.4react: 19.2.4react-dom: 19.2.4Workaround
Downgrading to Astro 5 resolves the issue since
@keystatic/astrosupports Astro 2-5.Expected Behavior
@keystatic/astroshould support Astro 6 and render the admin UI without React hook errors.