The client rendering is called after Microsoft.AspNetCore.SpaServices SSR #132

Closed
opened 2025-08-09 17:15:07 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @unpub777 on 3/14/2018

Hi All,
I'm using React+Redux SPA template and as I understand SSR philosophy a server fully renders a page content and a client should just display that.
I see in the browser network tab that the server sends initialReduxState and the rendered content, but if I put a breakpoint on the client in any render functions I see that is called. I don't understand why the client runs a render cycle again and what is reason of SSR if we rewrite that content on the client anyway.
I did a small experiment and deleted
html: renderToString(app)
from

params.domainTasks.then(() => {
            resolve({
                html: '',
                globals: { initialReduxState: store.getState() }
            });
        }, reject);

and nothing is changed. The client successfully displays the page content without SSR content.
So, how to prevent the client render cycle after SSR?

*Originally created by @unpub777 on 3/14/2018* Hi All, I'm using React+Redux SPA template and as I understand SSR philosophy a server fully renders a page content and a client should just display that. I see in the browser network tab that the server sends initialReduxState and the rendered content, but if I put a breakpoint on the client in any render functions I see that is called. I don't understand why the client runs a render cycle again and what is reason of SSR if we rewrite that content on the client anyway. I did a small experiment and deleted `html: renderToString(app)` from ``` params.domainTasks.then(() => { resolve({ html: '', globals: { initialReduxState: store.getState() } }); }, reject); ``` and nothing is changed. The client successfully displays the page content without SSR content. So, how to prevent the client render cycle after SSR?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#132
No description provided.