question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server side project requires alternative methodology -- A couple of ?

See original GitHub issue

I have a Blazor project underway that I am adding BlazorStyled. If I do the change to _Host.cshtml

    @(await Html.RenderComponentAsync<BlazorStyled.ServerSideStyled>())

several of my components fail to function (namely a modal popup and all derived from that. I can get everything to work using the ServerSideStyle component.

  1. Do you know what the interference issue is? I have control over my components so if needed I can change them.
  2. I have only one MainLayout.razor in a razor class library that is used by both a server side implementation as well as a client side implementation. The ServerSideStyle component does not seem to hurt on client side execution. I see that there is a similar ClientSideStyle component which is close in implementation. I seem to need the index.html addition for client side to work. Should I be composing the MainLayout via BuildRenderTree to avoid the ServerSideStyle component when I am client side or is my emperic observation of ‘it doesn’t hurt’ ok?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
MarkStegacommented, Aug 28, 2019

Absolutely correct; everything works as expected. Thanks for the assist. In your new documentation for the alternate install in the first sentence “insatall” needs a quick update. How about BlazorStyled as a rename of ServerSideStyled?

1reaction
MarkStegacommented, Aug 27, 2019

I’ve managed to pare down the project. If you build with configuration Debug-SSE you get a working client. Press the ‘customize’ button then repetitively the toggle. All works. Now build with Debug-CSE. Do the same sequence and watch wasm fall over in the developer tools starting with the three lines above. Add the <style id="styled" /> to index_cse.html and the crash doesn’t occur. Here is a zip of the project:

Blazor-CSE-SSE.zip

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server-side HTTP requests via `getSession` usually get ...
I am not sure what his opinion was on making an alternative method that would allow the user to deliberately do what they...
Read more >
Client-side vs. Server-side vs. Pre-rendering for Web Apps
Here, we'll discuss when to use server-side rendering and how this method works. ... This is why pre-rendering can be a really nice...
Read more >
A web application with no web server? | by Herb Caudill
There are two big challenges with building an app that works offline: It has to work when no server is available (duh), which...
Read more >
What do client side and server side mean?
Client side and server side describe where web application code runs. Learn more about client-side vs. server-side processes and client-side scripting.
Read more >
What is server-side rendering: definition, benefits and risks
Server-Side Rendering (SSR) is an approach to rendering content for the website. Learn the benefits, drawbacks and frameworks of server-Side ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found