Save Hours Of Struggle Knowing How To Solve This Blazor SSR (Static Server Side Rendering) Issue🔥

preview_player
Показать описание
💻 Use Code LONGERNIGHTS to get 20% off on any course or plan!

#DotNet #Blazor #AspNetCore
Рекомендации по теме
Комментарии
Автор

Thank you, Patrick. Static SSR goes against the original intentions of the Blazor tooling but it has value and I see why we have it.
As they say, "The struggle is real".

SBDavin
Автор

I had to build an app with SSR on the home page and interactive rendering on some admin pages. I ended up creating the home page with a razor page and javascript. I was able to pull static blazor components to the razor page. For my admin pages I used interactive rendering with blazor pages and blazor components. It's like 2 apps in one. 😊

williameduardo
Автор

Patrick, great post! It took me days to wrap my head around this. If only.... Are there any considerations on handeling a form this way with for instance multiple buttons/actions? Is that perhaps a subject for another video? Keep up the good work!

DeBuie
Автор

IS there no IsPostBack like there is in web forms? Because you had the same basic thing there.

pilotboba
Автор

Thanks Patrick, I had struggled with the exact same thing. I created a SO post for it, "Implementing and understanding a Blazor Static Server-Side Rendered Counter Page". Same as you, struggling to understand the workflow of static-SSR (SSSR maybe?). When it comes to form submissions, not only is the page reloaded, but you also need to ensure the form being submitted is rendered when it's reloaded, otherwise you will get a misleading error! It feels like static-SSR is more intelligible in MVC compared to Blazor, but once you understand it, it's not really a problem. It does however feel like much more work, so you end up just using interactive-SSR. The next real issue you should do a video on is static-SSR and usage of JS, as JS doesn't really fit with enhanced navigation. There's a nuget package from Mackinnon with the Blazor Team (BlazorPageScript) which works around the problem, but in reality, this feels like a patch until the Blazor Team gets their ducks in a row.

codefoxtrot
Автор

I learned a lot thanks to your videos. Thank you for your effort

adam-xtte
Автор

This exact thing happened to me a few days ago! It took me like an hour to finally remember something about prerendering issues.

Also, I'm currently having another issue. Suddenly I can't run that same project in debug mode. I get an error saying that it failed to launch the browser even tho it actually is opening the browser to a blank page. It works just fine in release mode. I really don't know what caused it. This is just a small test project so I'm not using git. I'm not losing anything important, but it's just annoying to suddenly be stopped by unknown issue

supercyclone
Автор

I have my SupplyParameterFromForm attribute and it still gives me null. I am using EditForm with Model property and still the object is not back after form submission, its driving me insane

sikor
Автор

I went all-in with Blazor but do regret not going the React route as Blazor is in danger of becoming a hot mess.

chairmakerPete
Автор

Videos are gettin kinda click-baitey. :|

philipatha