Add support for multiple roots with useId
Author: marvinhagemeisterCreated Oct 27, 2022Updated Jun 15, 2025
- Check if updating to the latest Preact version resolves the issue
Describe the bug
There may be clashes in ids with multiple roots in the same page. This is a follow-up issue to #3772 . See: https://github.com/preactjs/preact/issues/3772#issuecomment-1291460015
To Reproduce
https://codesandbox.io/s/preact-useid-multiple-y0qbwq?file=/src/index.js
Expected behavior What should have happened when following the steps above?
Source: preactjs/preact