Open johnnypea opened 3 years ago
I'm guessing you are following the appendIconComponentCache
guidance listed in https://github.com/elastic/eui/blob/master/wiki/consuming.md#failing-icon-imports for your SSR?
Actually, I just cloned the starter repo and run yarn dev
. Just wanted to point it out.
Well, that makes it easier to look into. Thanks 😄
For whoever looks into this first: that warning is issued when React first mounts/hydrates against server side code but is unable to match 1:1 the server DOM with DOM generated client-side. One quick example would be:
HTML from server
<span>
Hello
</span>
and a React component
<span>
Hello
</span>
Identical! Except the React component renders without any white space: React.createElement("span", null, "Hello");
while the server DOM contains the [collapsed] whitespace within the text node.
A quick glance at this error makes me think the server-rendered icon isn't the empty one, but then on first pass within the browser the icon set hasn't loaded yet and React starts with the empty icon, no longer matching the SSR DOM.
Hey, is there a solution for this ?