universal icon indicating copy to clipboard operation
universal copied to clipboard

page rendering on server side and client side

Open Mahmoud-hassan87 opened this issue 7 years ago • 12 comments

When try this example I show the page rendering twice on server side and rendering again on client side, Why this behavior occurs ?

Mahmoud-hassan87 avatar May 11 '17 07:05 Mahmoud-hassan87

Hi @Mahmoud-hassan87,

I have the same issue and looking for a solution, even though I don't think this seed is responsible for the issue, must be a Universal issue instead. They did have an issue for this particular bug but they closed it.

Gbuomprisco avatar May 12 '17 13:05 Gbuomprisco

@Gbuomprisco can you please share the issue url here? Maybe I can catch something from the information there.

fulls1z3 avatar May 12 '17 14:05 fulls1z3

Your sample have this issue

Mahmoud-hassan87 avatar May 12 '17 14:05 Mahmoud-hassan87

@fulls1z3 What I experience is exactly what is described in this issue https://github.com/angular/universal-starter/issues/139, and also others. Thing is these might be outdated now as they were using last year's code.

Gbuomprisco avatar May 12 '17 14:05 Gbuomprisco

@Gbuomprisco the info seems outdated, but can be useful. I'll dig into this a little this evening and see what can I do. @Mahmoud-hassan87 thanks for the enlightment 👍

fulls1z3 avatar May 12 '17 14:05 fulls1z3

Thanks @fulls1z3, I'll try as well

Gbuomprisco avatar May 12 '17 14:05 Gbuomprisco

@Mahmoud-hassan87 Not sure but you might be seeing this issue: https://github.com/angular/angular/issues/15716. Essentially the issue is that the server-rendered CSS is removed from the DOM before the client CSS is applied, causing a flicker regardless of if you transfer the state perfectly or not.

Apparently a fix should be landing in the next angular releases, i.e. 4.1.3 and 4.2.0-beta.2. Where the renderer waits for the client to finish before removing the server CSS.

Koslun avatar May 13 '17 14:05 Koslun

Thanks @Koslun

Gbuomprisco avatar May 15 '17 08:05 Gbuomprisco

@Koslun thank you so much for this information, now I realized the reason that I subscribed to the updates of https://github.com/angular/angular/issues/15716. Seems like we'll get it working soon, and I'm keeping this issue open in order to do not leave it unresolved.

fulls1z3 avatar May 15 '17 17:05 fulls1z3

Is there any update on flickering issue??

Skillnter avatar Sep 05 '17 09:09 Skillnter

@Skillnter we're working on this issue, as well as other enhancements to this seed project - so soon I'll be able to share some updates.

fulls1z3 avatar Sep 05 '17 12:09 fulls1z3

Is there any update on flickering issue??

smadil997 avatar Mar 15 '19 08:03 smadil997