Creating Blazor Components the right way

preview_player
Показать описание
In virtually all tutorials and articles, when it comes to Blazor Components, everybody just shows how you can have Razor sytax and C# code in the same file. However, I don't think that this is a right approach for real applications. Blazor support partial classes and it's easy to split markup and C# code in separate files. This makes everything more readable.

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

Well done. I enjoyed listening to your rationale about how & why. Looking forward to the next installments. Go Blazor!

ch
Автор

My thanks for this as you start to enjoy develop blazor apps to see some more advanced concepts has opened my eyes on different methods to achieve the same goals

darenbaker
Автор

Is there a reason you use an Character[ ] vs IEnumerable<Character> ?

crumbdav
Автор

The razor.cs file reminds me of the code behind of WPF. Thanks.

hokoder
Автор

How do you register an event like onClick event for this type of component?

mohsentavakoli
Автор

Character your choice is to put it close to the Razor component, is that more handy then put Character in a ModelView or a model? And alsoe the Response Model should be in a Shared folder Models ? And should you not put the actual GetHttprequest in a DataService class and inject that dataservice class in the Razor page/component?

satish
Автор

Is it possible to do scoped css and scoped javarcript. So like how other javascript frameworks you can easy write css and javscruot that will only affect this component. Is that possible?

DavidCoding
Автор

I think you should also do the injection of the Httpclient in the code file as well using the inject DataAnnotation

zimcoder
Автор

U r creating transient http clint, which isn't right, bcoz http sockets still holding in OS after you use it

Levonfly
Автор

Thanks Mr.Dan for your video.
I hope you talk about Refresh JWT Token in API and how Blazor wasm app should detect if the token will expire and refresh it in the background.

Tamer_Ali
Автор

not to sound rude but, this video doesn't make any sense

kyreehenry