Repository navigation
Description
Prerequisites
- I have read the Contributing Guidelines.
- I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.
What happened?
Summary
After a component hydrates, Stencil adds an internal hydrated class to the host element, and by default all components without the hydrated class are styled with visibility: hidden (FOUC prevention injected by defineCustomElements()).
When React dynamically updates the className prop after the component has mounted, React replaces the host element's class attribute entirely. This removes the internal hydrated class, so the component becomes permanently invisible.
Conditions
This occurs when all of the following are true:
- iX Web Components and React are used together in the same app
defineCustomElements()is called to register the web components- The iX React component is lazy loaded (e.g. via
React.lazy) classNameis set/updated dynamically after the iX component is mounted
The issue does not occur when the component is imported normally (not lazy loaded), or when className is static.
Reproduction
StackBlitz: https://stackblitz.com/edit/dm1yk8jy?file=src%2FIssue.tsx
- In a React app, call
defineCustomElements()to register iX Web Components. - Lazy load an iX React component.
- After the component has mounted (and Stencil has added the
hydratedclass), update itsclassNameprop dynamically, e.g. from state:const IxButton = React.lazy(() => import('...')); function ButtonWithIcon() { const [active, setActive] = useState(false); return ( <IxButton className={active ? 'active-class' : 'inactive-class'} onClick={() => setActive((a) => !a)} /> ); }
- Inspect the host element's
classattribute after the state change. - Observe that the
hydratedclass is gone and the component is hidden by the defaultvisibility: hiddenrule.
Expected behavior
Updating className should merge with the host element's existing classes so the internal hydrated class is preserved and the component stays visible.
Actual behavior
The dynamic className update fully replaces the class attribute, removing the internal hydrated class. The component then matches the default :not(.hydrated) { visibility: hidden } rule and becomes invisible.
Reference
- Template renderers remove hydrated class stenciljs/core#2109 (comment)
- https://stenciljs.com/docs/config#hydratedflag
What type of frontend framework are you seeing the problem on?
Others, React, JavaScript
On which version of the frontend framework are you experiencing the issue?
react@^18.3.1
Which version of iX do you use?
v5.1.1
Code to produce this issue.
https://stackblitz.com/edit/dm1yk8jy?file=src%2FIssue.tsx
Activity
AndreasBerliner commentedon Jul 23, 2026
Reference: EIX-106
benjgil commentedon Aug 6, 2026
@soutriiv
Fix implemented, as it's a breaking change will be released in version 6.0
github-actions commentedon Nov 4, 2026
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!