elastic / elastic/eui

[SSR] Replace htmlIdGenerator usages with useGeneratedHtmlId in all function components

Open
#7,093 6 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted tech debt
Dominant language
TypeScript
Stars
6.4k
Forks
911
Avg merge
2d 11h
Merged PRs (30d)
65

Description

## Summary

We currently use both `htmlIdGenerator()` (44 usages) and `useGeneratedHtmlId()` (46 usages) in our function components. `useGeneratedHtmlId()` calls `htmlIdGenerator()` internally when running on React 17 and lower (see #7078) and neither of these functions is SSR compatible, generating different results on server- and client-side.

## Acceptance Criteria

* All function components should use `useGeneratedHtmlId()` hook to generate unique identifiers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.