react-accessible-accordion v5.0.0 Release Notes

  • 👍 React Accessible Accordion now supports React 18 with its out-of-order streaming 🔋 feature.

    The new out-of-order streaming feature required using React 18's useId hook. This affects the DOM ids that RAA generates, changing from accordion__heading-raa-0 (React 16 and 17) to accordion__heading-:r0: (React 18). Although this change shouldn't affect most users, if you have any code that selects ids with DOM APIs such as document.querySelector() then the : characters will need escaping with \\ eg. document.querySelector('#accordion__heading-\\:r0\\:').

    When using older versions of React 16 or 17 the same DOM ids will be generated.

    ⬆️ Because of this change in behaviour this is a major version upgrade.