preact
preact copied to clipboard
Cannot read properties of undefined (reading '__m')
Describe the bug
call useId
will throw an error Cannot read properties of undefined (reading '__m')
similar to #4277
the environment is with Astro, probably related, but the error throws from preact
To Reproduce
- open the stackblitz link from Astro's Preact example https://github.com/withastro/astro/tree/latest/examples/framework-preact
- navigate to a component such as src/components/message.tsx
- add
import { useId } from 'preact/hooks';
and calluseId()
within component - look at the console or page preview to see the error
Expected behavior
useId is pretty useful, it should work