Is Blazor Better than React?

  Рет қаралды 39,658

Gavin Lon

Gavin Lon

Күн бұрын

In this video we compare two great technologies, Blazor and React, which are used primarily for the creation of SPA applications - Single Page Applications.
🕐 Video Time Indexes
-------------------------------------
00:00:00 - Introduction
00:00:29 - A brief introduction to React
00:01:17 - A brief introduction to Blazor
00:03:14 - The similarities between Blazor and React
00:04:40 - The differences between Blazor and React
00:08:21 - When to use Blazor
00:09:53 - When to use React
00:11:01 - Conclusion
Blazor Courses
------------------------
Build a Shopping Cart Application using Blazor WASM and Web API
🔗 • Blazor (WebAssembly) a...
Build a Sales Management Application using Blazor Server and Syncfusion Compoments
🔗 • Blazor Server App with...
React Courses
------------------------
Project Based React Course for Beginners
🔗 • React JavaScript Frame...
Ranking App using React with .NET (C#)
🔗 • React with .NET Web AP...
.NET 8 Playlist - Blazor's new Featurs and Enhancements
🔗 • What's New in .NET 8 ?
Support the Channel 👍
------------------------------------
Buy me a Coffee ☕️
🔗 www.buymeacoffee.com/GavinLon
PayPal
🔗 www.paypal.com/paypalme/GavinLon
🪙 BitCoin
12JZYMiRq5YRDN5R5zuyYt7jMN8eTpkgns
Please follow me on Twitter @GavinLonDigital
Links Referenced in this video
-------------------------------------------------
Nuget Packages
🔗learn.microsoft.com/en-us/dot...
.NET Assemblies
🔗learn.microsoft.com/en-us/dot...
CIL Code - Common Intermediate Code
🔗learn.microsoft.com/en-us/dot...
AOT - Ahead-of-Time Compilation
🔗learn.microsoft.com/en-us/dot...
Full Playlist - C# for Beginners Course
------------------------------------------------------------
🔗 • Unity for Beginners (C...
Free Courses and Educational Videos - Gavin Lon
-------------------------------------------------------------------------------
Blazor (Webassembly) Shopping Cart Application full playlist
🔗 • Blazor (WebAssembly) a...
Full playlist - Let's Build an ASP .NET Core MVC Web Application on .Net 5
🔗 • Part 1 - Overview - Le...
Full playlist - Advanced C# Course
🔗 • Introduction - Advance...
Full playlist - C# for Beginners Course
🔗 • C# for Beginners - Par...
Blazor Server App on .NET 6 Course - FreeCodeCamp
🔗 • Blazor Server App with...
🎶All Music in this Video was Created by Gavin Lon

Пікірлер: 228
@alexisnarvaez
@alexisnarvaez 6 ай бұрын
Using Blazor with Microsoft Fast Fluent UI here. I have a background with AngularJs, Angular 2+, React, Typescript, but... it is such a joy to use one language for both ends of an app. It is hard for me to go back
@GavinLon
@GavinLon 6 ай бұрын
Thanks for sharing your experience with Blazor, React and Angular. I totally agree - being able to use one language for full-stack applications is a huge advantage!
@michaelgaziotis2538
@michaelgaziotis2538 5 ай бұрын
To be fair though, you can use JS for both ends of the app too. You can write complete backends with NodeJS, all cloud providers and storage solutions provide NodeJs integration these days. If you have a team with JS/React devs, it’s easier to get stuck into NodeJS for backends, than learning the C#/ASPNet ecosystem. And vice versa, a team of C#/ASPNet devs would be more comfortable with Blazor than JS/TS/React. Personally, I think not knowing JS/TS and a front-end JS framework in 2024 really limits you a lot in the job market. Avoiding JS/TS is not really something you want to do as front-end or full-stack dev. Blazor is only 5% of the web framework market according to Statista, with React, Angular and Vue making up 75% between them. At the moment Blazor is more of a niche for backend/C# devs to do some front-end work.
@GavinLon
@GavinLon 5 ай бұрын
@@michaelgaziotis2538 I enjoyed reading your comment. I think you make a valid point about using JavaScript on the frontend and backend, but arguably .NET is more consistent and cohesive when used for a full stack solution. I certainly agree that it is essential as a developer to at least have a basic knowledge of JavaScript, and certainly recommended to learn either Angular or React for frontend user interactivity functionality. I think Blazor is likely to gain popularity as it is a great technology and Microsoft are investing heavily in Blazor. Anyway thank you for your great comment! :)
@LadrilloNaranja
@LadrilloNaranja 3 ай бұрын
​​@@michaelgaziotis2538 From a developer perspective, you are right. From a small to medium business perspective, blazor is just easier to work with and way more coherent. NET 8 improves it by a loooot and using the same domain classes is just beautiful. It's mostly plug and play, npm always gave me weird errors, and angular breaks everything every update 🥲
@unkn0wnrge189
@unkn0wnrge189 2 ай бұрын
Have work with js, jquery, vue.js, react If a manager make me stop working with blazor I will leave the company, not joking. I can even use maui to make apps using blazor view.
@paulgehrman
@paulgehrman 6 ай бұрын
One thing people don't talk enough about is debuggability. I think Blazor is much easier to debug than both React and Angular, especially Angular. That aspect of Blazor makes it a huge time saver, not to mention a sanity saver.
@GavinLon
@GavinLon 6 ай бұрын
I should have definitely mentioned debuggability! Thank you! Yes, Visual Studio for e.g. is super easy to use and efficient when it come to debugging Blazor applications. :)
@CreativeB34ST
@CreativeB34ST 5 ай бұрын
I can see what you mean, however I have no troubles debugging my Vite + React + Typescript in DevTools either. Typescript is key here, as it PREVENTS a lot of issues to begin with.
@richardj1319
@richardj1319 5 ай бұрын
This is such a big thing for me. I also appreciate how Microsoft virtually every year makes C# easier to read and write through smart simplifications and new features.
@user-vi7xn1tj9f
@user-vi7xn1tj9f Ай бұрын
@@richardj1319 Yes, but they actually HAVE to invest heavily into those technologies to stay competitive.
@ryanbaker7419
@ryanbaker7419 5 күн бұрын
@@user-vi7xn1tj9f same with react and other js frameworks
@dirkschannel5817
@dirkschannel5817 6 ай бұрын
Love Balzor. My team and I did Web Forms since form the beginning. We are now migrating huge web forms apps bit by bit to Blazor. A great experience. I usually don’t participate in discussions which tech is better. As an owner of a small software company, i would say, the best tech is the one your team knows inside out.
@GavinLon
@GavinLon 6 ай бұрын
Its great to get feedback from an owner of a software company that is upgrading from an older technology to Blazor! Fantastic that you are having such a good experience with the upgrade! I totally agree, always way more cost effective and more efficient to stick with a technology with which the majority of your software development team is familiar! :) Thanks for your great comment!
@dirkschannel5817
@dirkschannel5817 6 ай бұрын
@@GavinLon As much as I love new tech. That's usually not where the money is for most small an medium size software dev teams / companies. We do new projects in Balzor and .NET core. But I am quite sure, we'll maintaining .NET Framework and Web Forms Apps for at least the next decade and make good money off it. Some times I get a bit annoyed, when people talk BS about older Stuff like Web Forms or JSP in the Java World. It's still in use because it's well rounded and up to the task... That said, I have good hope for Blazor to be around in 20 years. If so, it'll be as good as an investment as Web Forms was. The tech guy in me loved Balzor from the start. The company owner in me took 5 years to gain the trust that it's worth the investment. Besides .NET we do a lot of Python.
@jimiscott
@jimiscott 6 ай бұрын
We're doing exactly the same thing.
@serb1146
@serb1146 5 ай бұрын
Workd on webforms fo a long time as well, now moved to React (Typescript)
@new.clasic5512
@new.clasic5512 5 ай бұрын
@@GavinLon starting wpf or winform hybrid or a blazor webassembly ?
@simonel-zawahri640
@simonel-zawahri640 5 ай бұрын
Yes. Next question😊
@CRBarchager
@CRBarchager 6 ай бұрын
I started using Blazor with the releaase of .NET 5 but the project was 3.1 and because of this I had to create alot of the components myself like a Radiobutton which didn't exist in Blazor 3.1. This made me learn alot of the internals of Blazor and I'm happy I did. I'm still using Blazor on a number of projects and are still developing on the 3.1 project which is now upgraded to .NET 6 and will be upgraded to .NET 8 later this month. I'm all for Blazor though we have down React projects as well.
@GavinLon
@GavinLon 6 ай бұрын
Its great to get all of this positive feedback about Blazor! Its definitely a sign that its going to grow a lot more popular in the coming years. I'm also looking forward to upgrading some of my projects to .NET 8! :)
@Trust_but_Verify
@Trust_but_Verify 5 ай бұрын
what third party blazor component do you use?
@CRBarchager
@CRBarchager 5 ай бұрын
@@Trust_but_VerifyWe don't use many at the moment. From the top of my head I know we use a couple of Blazored components and MudBlazor as the UI, but the rest are in-house developed components.
@farrukhmalik932
@farrukhmalik932 3 ай бұрын
Great. You will love it more and more when you upgrade to 8
@PetterIvarsson
@PetterIvarsson 2 ай бұрын
I did my first Blazor-project recently and used only plain classic HTML and C#. It was the shortest development-time of an app in my career.
@atpayero
@atpayero 6 ай бұрын
excelent Video, In my case I prefer Blazor because and can only use C# for Front end and Back end.
@GavinLon
@GavinLon 6 ай бұрын
Thank you!! :) Yes, that seems to be the most popular reason as to why developers choose Blazor - the significants of being able to code all aspects of a project in .NET and C# should not be underestimated! :)
@Ziron2008
@Ziron2008 3 ай бұрын
Blazor is the first Front-End invention I ever cared about.
@saleemali594
@saleemali594 Ай бұрын
Your mom was the first front end invention i cared about
@ManInTheFridge
@ManInTheFridge 5 ай бұрын
Tired of the 'It depends on your personal needs' answer when debating frameworks. There can and should be clear winners. We have all the info necessary to prove there can be. Blazor is one of them. It will be able to handle almost any web scenario with way more efficiency than React or Node. Same with .Net API or just .Net in general. I would pick .Net and C# any day. We have an overly saturated market causing too much indecisiveness and pain and some of these frameworks (especially JavaScript) need to be retired. What's a big market and tons of job opportunities worth at the cost of our own mental health?
@GavinLon
@GavinLon 5 ай бұрын
I think if a company is for e.g. heavily invested in React, it may not make financial sense to move to another technology. I do take your point though, .NET is overall a far superior technology than anything in the JavaScript domain.
@knload
@knload 15 күн бұрын
I'm looking at React and Blazor for a SaaS. Wanted to build a mvp with Next.js but I need sockets open for long periods of time. React + Express is ok but it does not have ssr the way i want it. Next and express is possible but seems over complicated. I'm well skilled in js but not c# Started learning Blazor to see if it fits my requirements. Is blazor ok for a bit more complex ui interactions like drag and drop, window rescaling (meaning as window), code generated html(like dangerously set inner html but created over a custom html builder-intended for user created forms-like google forms)? Sorry for my bad English, and thanks.
@GavinLon
@GavinLon 14 күн бұрын
Blazor is an excellent technology but if you are unable to do a particular thing like drag and drop for e.g. you are still able to interop with JavaScript - so you are never limited. Best of luck with your mvp :)
@knload
@knload 14 күн бұрын
@@GavinLon Thanks for the reply, I appreciate it.
@MatinDevs
@MatinDevs 6 ай бұрын
With .NET 8 release, now Blazor has really something unique to say in market
@GavinLon
@GavinLon 6 ай бұрын
I totally agree 🙂
@jimiuji9269
@jimiuji9269 4 ай бұрын
Yesss 😊
@user-vi7xn1tj9f
@user-vi7xn1tj9f Ай бұрын
To me it is the first web technology that sparked my interest to a very real level.
@ALKASHIF-
@ALKASHIF- 4 ай бұрын
i think blazor in error handling is the best choice i am very excited to start working with blazor
@GavinLon
@GavinLon 4 ай бұрын
That's true - error handling using C# is super easy to implement. :)
@happyfarang
@happyfarang 2 ай бұрын
I will try Blazor for my next project. I don't like web development but I am forced to do it now. I have done a lot of C# for years so... Blazor it is for me :)
@GavinLon
@GavinLon 2 ай бұрын
Blazor is awesome. I'm sure you'll love it! I'll be releasing a few free Blazor courses on this channel this year
@happyfarang
@happyfarang 2 ай бұрын
@@GavinLon and that's how you get me to subscribe! hehe. Looking forward to it
@TheRealXartaX
@TheRealXartaX Ай бұрын
MudBlazor is a decent library to start with for easy UI components. Don't make the mistake of using MatBlazor as it's not supported anymore.
@GavinLon
@GavinLon Ай бұрын
@@TheRealXartaX Great! Thanks for sharing this useful information! :)
@user-vi7xn1tj9f
@user-vi7xn1tj9f Ай бұрын
The learning curve is not that steep I found out. There is quite a few things to learn, but it will eventually fall into place and start making a sense.
@ChristianHowell
@ChristianHowell 6 ай бұрын
Short answer, YES... The ability to use SignalR under the covers means you get pure C# with the entire .Net Core pipeline... I used the advanced templates for React 2 years back and it can't do much more... My big issue is server side rendering... It gives you a compiled security model so things can be hidden better... I prefer the C# model for components... .Net8 is far beyond any TS frameworks... SPAs are great but they require even smaller UI components to fit phones... Some UIs will never work correctly... C# FTW...
@GavinLon
@GavinLon 6 ай бұрын
Thank you! I really enjoyed reading your comment! You have given those that read this comment a clear reason why Blazor may be a better choice than React :)
@ChristianHowell
@ChristianHowell 6 ай бұрын
@@GavinLon It's something I looked at for several months and I just found that Blazor is the natural progression of Web Forms, which I rarely used JS for... I went through Silverlight, Angular, etc. and MVC was a good progress though you still need JS... With Blazor you can still use your JS while you move to a fully server side model... That's not to say that React isn't a valid choice, but C# is just a more scalable and powerful language... For Fortune 100 security I would only choose .Net... And believe me it's not the most popular opinion... I actually think Sitecore is the most direct competitor to Blazor... It used to be a developer's platform but now it's not... It's almost a mythical man month platform...
6 ай бұрын
Good one! 👍
@GavinLon
@GavinLon 6 ай бұрын
Thank you! :)
@xeoneraldo1254
@xeoneraldo1254 6 ай бұрын
Blazor WASM is compatible backwards even on browsers that dont support web assembly, like Internet Explorer thru polyfill
@GavinLon
@GavinLon 6 ай бұрын
Thanks for your comment. Blazor server is supported on Internet Explorer 11 with pollyfills, Im not so sure about Blazor WASM. I've included the below URLs for further information. learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/5.0/blazor-browser-support-updated github.com/Daddoon/Blazor.Polyfill copyprogramming.com/howto/how-to-detect-unsupported-browsers-under-a-blazor-webassembly-application
@stepbro2203
@stepbro2203 3 ай бұрын
Haven't touched C# in years! Used to make websites using Web Forms lol. I mainly do mobile now and a bit of ml but since I want to revisit web development, might as well learn Blazor instead of React.
@hammeedabdo.82
@hammeedabdo.82 6 ай бұрын
Both are great, in the end it depends on your needs, and the next.js framework is also great.
@GavinLon
@GavinLon 6 ай бұрын
Yes, I want to do a video on Next.js - it is also a great framework! :)
@markcooke4866
@markcooke4866 6 ай бұрын
It seems like they're both trying to solve similar problems. Next 14 with server actions sounds very much like the hybrid scenarios shown for Blazor Web apps.
@GavinLon
@GavinLon 6 ай бұрын
@@markcooke4866 Absolutely Blazor Next.js have similar capabilities. Both provide the developer with a lot of flexibility.
@user-vi7xn1tj9f
@user-vi7xn1tj9f Ай бұрын
There are many great JS frameworks, but for me as a primarily C# developer Blazor represents a great headstart.
@RemiThomas
@RemiThomas 6 ай бұрын
Blazor server side is a BIG dev time saver because you don't need to create API and you debug it like a C# console. This is so confortable.
@GavinLon
@GavinLon 6 ай бұрын
I totally agree! Blazor Server has many great benefits. The only downside is the potential latency caused through maintaining a persistent signal-r connection between client and server.
@afrorecording
@afrorecording 6 ай бұрын
@@GavinLon Yes but that was before .Net 8 Release that changed everything.
@mazingguitar
@mazingguitar 6 ай бұрын
Have experience in Blazor, React and Angular and ooooh boy. Angular is love
@GavinLon
@GavinLon 6 ай бұрын
Great - thanks for your feedback :) I also think Angular is a great technology!
@daaa57150
@daaa57150 5 ай бұрын
Agreed ;). Blazor is a pain to develop for, everything takes so much time, React is full of tricks and traps, and Angular is just so well structured. This is of course a personal opinion.
@ladrillorojo4996
@ladrillorojo4996 Ай бұрын
@@daaa57150 I prefer vuejs, turned out way more friendly for me.
@chrisr236
@chrisr236 Ай бұрын
If a highly interactive web interface isn't required for a specific app, what's the best technology to use for the view? Just standard Razor views?
@GavinLon
@GavinLon Ай бұрын
In .NET the two frameworks that you can use for scenarios where highly interactive functionality is not required are Razor Pages and MVC. In .NET 8 you can leverage the Blazor Web App project template which allows you to leverage server-side rendering (much like with MVC and Razor Pages). With the Blazor Web app project template you now have the option of using Blazor Web Assembly or Blazor Server to render your highly interactive components or pages - or you can choose to use server-side rendering instead (for components that don't require highly interactive functionality ). I hope this helps :)
@chrisr236
@chrisr236 Ай бұрын
Which is the simplest way to go for developing internal apps where high levels of interactivity may not be required?
@mhmohammadi9652
@mhmohammadi9652 6 ай бұрын
Blazor is fast development, since better state management and parameter drilling even compare to redux and api hook in react, it has many prons vs react ...
@GavinLon
@GavinLon 6 ай бұрын
Great to see so much love for Blazor! Thanks for your comment! :)
@VoidBeyondTheSilence
@VoidBeyondTheSilence 5 ай бұрын
What should be taken into account is JS-Interoperability of Blazor. Yes, it's not too easy to implement by now, but in theory you could embrace other technologies like React, Vue, etc. inside of a Blazor Project, giving you the best of two worlds in one solution. This should be done with some caution of course, since concepts (especially state-management) don't simply mix and match. But thinking of the great ecosystem of mature technologies like React and the possibility to to encapsulate a react-component inside of a Blazor component, you might be able to have an implementation taken out of a React ecosystem and maybe later replace it with a "Blazor-Native"-Implementation, once you have a good alternative.
@GavinLon
@GavinLon 5 ай бұрын
That is a very good point! There are efforts toward making these technologies far more interoperable which as you have said make it easy to leverage the best of both worlds! :)
@X3noic
@X3noic 5 ай бұрын
short answer, YES!
@GavinLon
@GavinLon 5 ай бұрын
Another one for the Blazor team. Excellent!
@SpatioTemporalEntity
@SpatioTemporalEntity 23 күн бұрын
One language for both ends Dependency Injection!! IJSRuntime when needed, including integrating existing Angular components RenderMode, mixing SSR and WASM components in a single solution Blazor is nice, very nice...
@GavinLon
@GavinLon 23 күн бұрын
It definitely ticks all the boxes! I agree, Blazor is great!
@kourosh234
@kourosh234 2 ай бұрын
The answer is simply: YES
@shafialanower3820
@shafialanower3820 6 ай бұрын
Do you think more companies will adopt blazer now? Especially if a lot of their code base is full of JS and React stuff or small startups will use it more often. I’m new to this but always see a some web devs disliking Java script lol
@GavinLon
@GavinLon 6 ай бұрын
Unfortunately some companies can take a long time to adopt new technologies but I'm sure Blazor will become more and more popular especially with the release of .NET 8. If I were to choose a technology to develop a new, full-stack web based application, I would certainly choose .NET 8 and Blazor.
@markcooke4866
@markcooke4866 6 ай бұрын
I feel like the industry still has an anti-MS bias, although it seems like Typescript and VSCode are big wins.
@GavinLon
@GavinLon 6 ай бұрын
@@markcooke4866 I totally agree - I've never quite understood that anti-MS bias. I really believe that when it comes to software development tools - they are the best. I also think that C# is the best programming language around. They are also community minded and provide free tools and support for software developers and aspiring software developers.
@saberint
@saberint 5 ай бұрын
Blazer WASM front end, minimal api for the backend. Lightning fast and the actual load time for the initial page is not an issue. To me, it makes it look like a more professional and personalised site.
@GavinLon
@GavinLon 5 ай бұрын
With auto mode released in .NET 8 - this provides a solution to the slow initial load times of Blazor WASM components.
@saberint
@saberint 5 ай бұрын
@@GavinLon I actually like to see the loading animation… it makes me feel like the computer is doing work😂 and likely a throw back to the age when we would turn the computer on, make a coffee and come back to (hopefully) see the OS loaded. I haven’t looked into auto mode yet so thanks for that tip 🙂
@GavinLon
@GavinLon 5 ай бұрын
@@saberint I also enjoy watching spinners as my page loads - as long as it doesn't take too long :)
@new.clasic5512
@new.clasic5512 5 ай бұрын
this is depend of which country the app run , have fast connection ? have update browser ? who is it your users ? can wait a little for download wasm ?
@saberint
@saberint 5 ай бұрын
@@new.clasic5512 well yeah, I make business web applications so for me, it’s the best. If your serving up a blog you sure don’t need it
@fredbolli4704
@fredbolli4704 2 ай бұрын
Let's not forget that debugging any of the JS overlays (React, Vue etc...) is a horrible process. With Blazor being C# you have all the mature debugger options available to you. This can make for a much quicker and less frustrating development.
@GavinLon
@GavinLon 2 ай бұрын
Great comment! I agree! :)
@drink8686
@drink8686 2 ай бұрын
You're forgetting about TypeScript.
@DevLearn-lv7nr
@DevLearn-lv7nr 3 ай бұрын
and with the title of the video suggesting there was an answer to this he couldn' t commit to a decision on which is better - i hate people playing it safe and sitting on the fence
@CodySkidmorenh
@CodySkidmorenh 10 күн бұрын
This video was released around 2023.12. Can you provide more details about why Blazor releasing six years ago means it is relatively new?
@GavinLon
@GavinLon 10 күн бұрын
Sure okay. Blazor is a SPA framework which is conceptually relatively new in comparison to the other .NET web frameworks like asp .Net MVC or Razor pages. Blazor is relatively new in comparison to the most popular SPA frameworks like React (I know some people like to quibble about whether React is a library or a framework - okay it's a library) and Angular. I would argue that Blazor on .NET 8 is almost like a new framework when compared to Blazor before .NET 8, because it has been significantly enhanced (e.g. multiple render modes can be included in the same project). The key word is 'relative'. It's obviously not a brand new framework.
@bryanpaderes8963
@bryanpaderes8963 6 ай бұрын
Great video, as always❤
@GavinLon
@GavinLon 6 ай бұрын
Thank you! :)
@farrukhmalik932
@farrukhmalik932 3 ай бұрын
Blazor is a big platform. MAUI blazor apps is another big thing, you can't compare Blazor with REACT and you can't limit Blazor to a single page application development tool. Blazor is bigger a lot bigger
@GavinLon
@GavinLon 3 ай бұрын
Comparing the two technologies is primarily a way for learners to gain a basic knowledge of both technologies. I agree, Blazor is very versatile.
@kuhaniresti
@kuhaniresti 6 ай бұрын
i'm listening
@farrukhmalik932
@farrukhmalik932 3 ай бұрын
Blazor can be used for any kind of application. You can never say when to use Blazor and when bonuses React. It's on the developer what he/she choose, and being a Blazor developer I assure you that you can blazor for any kind of application, the power you have is Blazor is way far better and modern.
@GavinLon
@GavinLon 3 ай бұрын
Thank you! Yes, Blazor is super powerful and versatile!
@godfreykuboi6809
@godfreykuboi6809 6 ай бұрын
Blazor for me is the way to go
@GavinLon
@GavinLon 6 ай бұрын
Another point for the Blazor team! :)
@rankarat
@rankarat 6 ай бұрын
Svelte should be the choice for a JS framework due to its simplicity, while Blazor WASM excels beyond the initial load time latency. They both provide a coherent component structure, streamlining development more so than React. Blazor, however, has its intricacies-JavaScript modules are globally scoped rather than instance-scoped, necessitating state management for each component instance. This adds complexity to state handling, which is more straightforward in frameworks like Svelte. Furthermore, Blazor's two-way binding doesn't natively support parameterized properties, requiring custom solutions to achieve this commonly needed functionality. It's vital to grasp Blazor’s component lifecycle, particularly when JS modules are involved post-initial render, to avoid potential performance hits. Svelte is nearly perfect but lacks the ability to split code into separate files-unlike Blazor, where CSS, C# code, and markup can be neatly organized into .css, .cs, and .razor files, respectively.
@GavinLon
@GavinLon 6 ай бұрын
Wow - thanks for that super detailed comment. I really enjoyed reading that! Svelte is a technology I'd love to explore in more depth! :)
@PortalUser2
@PortalUser2 6 ай бұрын
I like Svelte as well, but I like Blazor more due to its flexibility. Regarding your comments, if this helps: Blazor has been able to load instance scoped javascript modules since at least the prior version. In other words, you can have a blazor component appearing multiple times on a page that is associated with an instance of a javascript module. That functionality is included in the box now without any extra work. Regarding Blazor supporting parameterized properties, I am not sure what you mean. But if you mean generic parameters, then you can create a blazor component with multiple @typeparams and then create parameters of those types T1, T2 (etc). You can then 2-way databind to those generic parameters in a page - all with type inference (you don't even need to specify the type of the generic parameters as they are inferred via the databinding) . After reading your comment I questioned myself, so just did exactly what I described above and it works fine in Blazor dotnet 7. I absolutely know that some of this stuff was not in dotnet 5 and maybe not in .net 6, but is all certainly has been part of Blazor in .net 7 for the past year.
@GavinLon
@GavinLon 6 ай бұрын
@@PortalUser2 Wow -thanks for your detailed comment - I'm sure this will be helpful and informative to many viewers.
@rankarat
@rankarat 6 ай бұрын
@@PortalUser2 I appreciate your perspective, but I'd like to re-emphasize the nuances in my initial comment. Regarding JS modules in Blazor, they aren’t instance-scoped by default, which means we need to manually manage the state for each component instance using JavaScript objects or similar structures. As for two-way binding, binding directly to a parameterized property in Blazor requires additional steps. You need to convert it into a full property with a backing field to trigger the change notification. With the upcoming .NET 7, there's also an added layer where it warns against using parameterized properties for two-way binding, suggesting that an auto-property should be used instead. I hope this clarifies the intricacies I was pointing out.
@Jared-150
@Jared-150 6 ай бұрын
I'm not familiar with "parameterized property" in a C# context so I searched and discovered the only parameterized properties possible in C# are indexers. Is this what you mean, ​ @rankarat? public int this[int index] { get { ... } set { ... } }
@seanweb0007
@seanweb0007 5 ай бұрын
"Your tearing me apart!" 🤣🤣🤣🤣
@timmyers9798
@timmyers9798 6 ай бұрын
It's likely that react will still be more popular simply because of the community support and existing available libraries. However, in my opinion both Vue.js and Blazor are better frameworks. C# is though a much nicer language to work with professionally.
@GavinLon
@GavinLon 6 ай бұрын
Yes I think (for the reasons you have mentioned) it'll be very difficult at this stage for relatively new technologies like Blazor to complete in popularity with React, even through Blazor provides a lot of advantages. :)
@muaadeeb9625
@muaadeeb9625 5 ай бұрын
Blazor just needs more time, React has had multiple years head start. .NET 8 is a game changer.
@RonnieSunde
@RonnieSunde 6 ай бұрын
This video had lots of potential, but failed at comparing properly.
@DerClaudius
@DerClaudius 5 ай бұрын
Agree... waited for the explanation what the equivalent of JSX would be in blazor..
@miketob2005
@miketob2005 4 ай бұрын
Great content, but the cartoons are out of sync from the narration and that is VERY distracting
@GavinLon
@GavinLon 4 ай бұрын
Thanks for your feedback. I would humbly disagree with you there about the pictures being out of sync with the narrative but I appreciate your comment :)
@xxXAsuraXxx
@xxXAsuraXxx 6 ай бұрын
Blazer looks nice. But I don’t think it can do micro front end or embedded spa
@GavinLon
@GavinLon 6 ай бұрын
Blazor can do micro front ends - learn.microsoft.com/en-us/shows/on-net/on-dotnet-live-micro-frontends-with-blazor Blazor components can also be integrated into for e.g. MVC, React and Angular applications
@alexhardy09
@alexhardy09 6 ай бұрын
Blazor with mudblazor just enough
@GavinLon
@GavinLon 6 ай бұрын
Mudblazor is great! :)
@alexhardy09
@alexhardy09 6 ай бұрын
I learn a lot from your video Gavin, 2 month after i can finish my first blazor server project for my customer Hino truck
@GavinLon
@GavinLon 6 ай бұрын
@@alexhardy09 That's awesome! :)
@betterlifeexe4378
@betterlifeexe4378 6 ай бұрын
Yes, yes it is. JavaScript is a mess.
@GavinLon
@GavinLon 6 ай бұрын
Cool - one for the Blazor team! :)
@wegene2056
@wegene2056 6 ай бұрын
yes, but blazor low number of community is my main problem.
@GavinLon
@GavinLon 6 ай бұрын
@wegene2056 - My feeling is that Blazor is likely to grow in popularity in the coming years, and therefore the eco system will also grow :)
@betterlifeexe4378
@betterlifeexe4378 6 ай бұрын
@@wegene2056 I'm thinking of the number of premade components that I can use, many of them for free. I think blazar is both well supported and growing rapidly.
@felipepassion
@felipepassion 6 ай бұрын
it's not low. It's just growing exponentially dude. And we already about everything we want to in the web on these days. we are not in 2018 anymore. @@wegene2056
@s-code-b
@s-code-b 6 ай бұрын
[11:40] 'JSX' should be 'JavaScript XML'; not 'Java XML'.
@GavinLon
@GavinLon 6 ай бұрын
Oops - thanks - yes of course I meant JavaScript XML :)
@benjaminng8882
@benjaminng8882 6 ай бұрын
A lot of frameworks better then React but still, a lot of companies choose to use React
@GavinLon
@GavinLon 6 ай бұрын
True, I like React but as you say there are better technologies out there.
@dovh49
@dovh49 6 ай бұрын
Anything is better than React. Personally I prefer HTMX. Granted, I use my own little library instead as I can get the same benefits out of a fraction of the HTMX library.
@GavinLon
@GavinLon 6 ай бұрын
I personally really love React but I take your point about HTMX. I will definitely provide a video on HTMX in the not too distant future. Than you!! :)
@dovh49
@dovh49 6 ай бұрын
​@@GavinLon Yeah, I know there are a lot of people that love React and I agree that there are some good things about it and it has its place. I just work on internal business applications that are pretty much forms. We've taken something that is super simple and made it super complex by adding Reactjs on top of it. I think pushing all the state on the front end makes the complexity non-linear in nature when simple templates on the back end make the complexity more linear in nature. So, the issue isn't necessarily React itself all front end technologies. Also, front end technologies tend to become monoliths and aren't easily decomposed. Where HTMX decomposes nicely. On top of that everyone wants full stack developers but then they give us front end technologies rather than technologies that are friendly to back end developers. HTML isn't that hard to write. But with technologies like React they make the easy complex. Also, I think with custom elements they solve some of the front end state issues that are local in nature. I just with Safari would get on board with the `is` operator.
@GavinLon
@GavinLon 6 ай бұрын
@dovh49 Very interesting comment, you clearly have a deep knowledge of these front-end technologies. Thank you, I enjoyed reading it and I'm sure many of the viewers of this channel will benefit from it too.
@dovh49
@dovh49 6 ай бұрын
@@GavinLonYeah, I don't know if I have a "deep" understanding. I'm just trying to figure it out like everyone else 🙂.
@GavinLon
@GavinLon 6 ай бұрын
Well they say that all developers on the planet know less than 1% of everything there is out there (of course that is not an exact science lol) - I have over 20 years of experience in many different technologies but I am continually learning -which is a key reason why I love programming and technology so much!
@michacuranda5603
@michacuranda5603 6 ай бұрын
So you just fed your recordings to an AI and you're using it to read your scripts?
@richardaubin1951
@richardaubin1951 6 ай бұрын
I've mentioned this to him before, but he claims it's 100% him.
@GavinLon
@GavinLon 6 ай бұрын
Not true! I do not use AI in my videos at all!
@ghevisartor6242
@ghevisartor6242 6 ай бұрын
what difference does it make if he did?
@Mo-ef9yt
@Mo-ef9yt 2 ай бұрын
With React you will have to install many programs.
@caseyspaulding
@caseyspaulding 6 ай бұрын
React is Nice! Even if it uses JavaScript. Blazor is good for C# devs who want to do frontend and not learn JavaScript frameworks
@GavinLon
@GavinLon 6 ай бұрын
Absolutely! They are both awesome technologies but I do love being able to code interactive browser functionality in C#! :)
@caseyspaulding
@caseyspaulding 6 ай бұрын
That is nice. It just comes down to right tool for the job
@jluisxp8553
@jluisxp8553 6 ай бұрын
Personally, I prefer Blazor than React because the learning curve is less in Blazor....
@GavinLon
@GavinLon 5 ай бұрын
I agree I also think Blazor is pretty easy to learn :) Learning JSX and hooks in React, can make that learning curve quite steep.
@daaa57150
@daaa57150 5 ай бұрын
With all the time taken to compile and launch a Blazor app (WASM) during development, you could master React instead. And there are still things that Blazor can't do without bridging to JS anyway :/. And the size of the bundle is gigantic. Personally I'd choose Angular over both though.
@GavinLon
@GavinLon 5 ай бұрын
Thanks for your comment. I think with the release of .NET 8, Microsoft has shown commitment in its continued investment in Blazor. Being able to combine the benefits of Blazor Server, Blazor WASM, Server side rendering and streaming rendering in one project is a great step forward. The use of the auto render mode in .NET 8 can be used to significantly increase initial load times. So a lot of improvements to the Blazor framework are being made. I think Blazor has a bright future but Angular and React are of course fantastic front-end technologies. :)
@count_of_pizza
@count_of_pizza 6 ай бұрын
It's not better just different. It's much harder to learn than React, small community and not ready for really big projects, no support for modern CSS frameworks etc.
@GavinLon
@GavinLon 6 ай бұрын
Thanks for your comment. :) I appreciate your opinion on this.You can certainly integrate modern CSS frameworks into your Blazor applications. The community is small but growing steadily. Loads of new free resources are also becoming available. I think it depends on your current skillset as to whether Blazor is difficult to learn or not. Perhaps for e.g. if you are familiar with JavaScript frameworks and have no prior knowledge of .NET, it may be better to learn React. I wouldn't say that Blazor in general is difficult to learn - I think it is pretty straight forward (but I acknowledge that is purely from my perspective).
@count_of_pizza
@count_of_pizza 6 ай бұрын
@@GavinLon I mean that Blazor is much harder to learn than React. I was testing Blazor for 6 months and working on one small project which was released. From my perspective it's hard to use modern CSS like sass or ccs in code without js, hot reloading was is a pain, even support for modern CSS syntax is problematic. You can always use tailwind or bootstrap but this kind of solutions are good for back office apps. More complicated forms even are hard to handle, fluent validator shloud be repleaced by some form libs like in React.
@GavinLon
@GavinLon 6 ай бұрын
@@count_of_pizza Thanks for your comment. Yes, I understand what you are saying. I have found Blazor fairly easy to learn (that's just my perspective of course). Blazor is getting a lot of investment from Microsoft and is definitely getting more and more advanced with each release of .NET. I also think React is an excellent framework and also has the advantage of being easy to learn. :) Integration with modern CSS frameworks is also very easy with React as you have said. Thanks! :)
@count_of_pizza
@count_of_pizza 6 ай бұрын
@@GavinLon I see that, but to make community bigger they need to invest more money in community, docs, tutorials. I know .net teams which prefer to use Angular over Blazor, because it's hard to use for the reasons I mentioned.
@valentinorossi5328
@valentinorossi5328 5 ай бұрын
blazor is much easier for c# devs
@chrislunar8214
@chrislunar8214 5 ай бұрын
Is HTMX better than Blazor?
@GavinLon
@GavinLon 5 ай бұрын
HTMX is a very interesting technology - it would be interesting to compare it to for e.g. React, Angular or Blazor.
@ThushanVithana
@ThushanVithana 5 ай бұрын
Yes, Blazor is Better than React
@GavinLon
@GavinLon 5 ай бұрын
Thanks for your comment. Great to see that there is plenty of love for Blazor! :)
@cjt9150
@cjt9150 5 ай бұрын
React released in 2013, blazer released in 2018 and now 2023 only it is come to play, So about 10 years, where did blazer went, only after seeing react's improvements and attractiveness amoung people then only microsoft very slowly take decision to invent technology like react. In these 10 years, lot more projects done on react, and M/S only give this taste after 10 years, so microsoft is always .......................
@GavinLon
@GavinLon 5 ай бұрын
Thanks for your comment. Yes, there is no doubt that React is the most popular SPA technology out there but I would argue that it doesn't necessarily make it better than its competitors. Having said that, React is a fantastic technology and I really love working with React.
@user-zf2xe8nm5f
@user-zf2xe8nm5f 4 ай бұрын
the animations/visuals are stylistic and have nothing to do with programming science. it's quite annoying and distracting..
@user-zf2xe8nm5f
@user-zf2xe8nm5f 4 ай бұрын
at present web assembly is fully supported in all the browsers that matter.
@GavinLon
@GavinLon 4 ай бұрын
An important part of programming are abstract concepts. There are plenty of technical videos on my channel where I literally go through code examples step by step. These videos abstractly explain concepts. Thank you for sharing your opinion. :)
@GavinLon
@GavinLon 4 ай бұрын
@@user-zf2xe8nm5f "The browsers that matter" may be true in most cases but not true in all cases. The fact is not all browsers support web assembly.
@evelop3625
@evelop3625 6 ай бұрын
Microsoft prefers to use React over Blazor
@cagrsakaoglu5589
@cagrsakaoglu5589 5 ай бұрын
Simple answer: No
@GavinLon
@GavinLon 5 ай бұрын
Fair enough. Thank you for your comment. :)
@RogueTravel
@RogueTravel 6 ай бұрын
React can target mobile apps and they use native components. There is no equivalent out there in the market.
@Mimmsanfrostborned
@Mimmsanfrostborned 6 ай бұрын
Blazor does the same.
@RogueTravel
@RogueTravel 6 ай бұрын
@@Mimmsanfrostborned I understand the claim, but respectfully, you cannot make this claim. It is not comparable to React Native. It does not accomplish the same.
@Mimmsanfrostborned
@Mimmsanfrostborned 6 ай бұрын
@@RogueTravel how come I have accomplished the same?
@Dimkar3000
@Dimkar3000 5 ай бұрын
lets not joke our self, the only reason to choose blazor is that you only know c# and can't stand the prospect of learning anything else. In any conceivable way, react is better while not being that good. Blazor is just that bad
@GavinLon
@GavinLon 5 ай бұрын
Thank you for your comment. I certainly don't agree that Blazor is bad, I do however, understand why someone may prefer React. I really like React but one of the reasons I may choose Blazor over React is because you can develop the entire full-stack web application using .NET and C#. I think a lot depends on personal context. One of the reasons to use Blazor and not React may be because you are proficient in C# and .NET and don't want to learn the unique concepts in React like for e.g. JSX. Fair enough :)
@Dimkar3000
@Dimkar3000 5 ай бұрын
@@GavinLon Don't get me wrong, I agree that having a single language in your stack has its benefits. But the developer(s) are the only ones who get to have that benefit. Your users get to have the worst experience. The web is using JavaScript, why ship another runtime to do UI updates, it doesn't make any sense. Your app will load slower and be heavier in the client's browser. Also, with any slightly more complex app, you will have to interop with javacript, to use browser feature that have no mapping yet to blazor yet. What about javascript libraries you may need to use. You may have to use them with manual interoperability, writing javascript. Overall, for me, blazor has a single benefit and a lot of problems that will hit you in the face later as your app grows. It's a foot gun.
@GavinLon
@GavinLon 5 ай бұрын
@@Dimkar3000 Thanks for clarifying. This is why comments are so important. This channel is about education and certainly not just about my point of view. So it's great if people read these comments and use the information to make up their own minds. I don't necessarily agree with everything you have stated (perhaps a comprehensive debate is required) but I certainly see the value in your comment. Thank you :)
@emilz0r
@emilz0r 5 ай бұрын
Writing everything in c# is not an argument without recognizing that you are allready biased towards c#. You can write full stack in js, and lots of other languages
@kaihusravnajmiddinov5413
@kaihusravnajmiddinov5413 6 ай бұрын
Blazor provides ease for those who master it. It uses the same language and libraries for web and none web developments. JS and related framworks like React are really good in frontend and had been the only choice for interactivity above http request so far. If blazor or something alike wouldn't appear into the scene, it was possible that the pain of full stack development would make someone to reinvent the web standards. Hopefully, webassembly provides some degrees of freedom to enhance the existing platform, with solutions like blazor.
@GavinLon
@GavinLon 6 ай бұрын
I really like what you said about webassembly. I think it is a step in the right direction so that web developers are not bound to JavaScript based technologies to create high performing interactive UIs. :)
@kaihusravnajmiddinov5413
@kaihusravnajmiddinov5413 6 ай бұрын
@@GavinLon agree sir.
@chudchadanstud
@chudchadanstud 5 ай бұрын
You forgot to mention that Blazor is unusable if you don't pay a small fee to Microsoft
@stefanmatijevic5810
@stefanmatijevic5810 5 ай бұрын
What does that mean? I'm just curious, since I'm looking to switch from PHP/JS to C# and .NET. The only thing that worries me is expences. I don't even understand how much I'd have to pay for Azure or something.
@chudchadanstud
@chudchadanstud 5 ай бұрын
@@stefanmatijevic5810 it means you have to pay for visual studio every month and that's not cheap. No the community version won't cut it license wise. I've tried to use C# without VS and it's a terrible over complicated experience.
@adamc1694
@adamc1694 5 ай бұрын
@@chudchadanstud That is a lie. A Blazor project technically is just a bunch of text files which can be edited thorough any text editors for example the notepad and being compiled or executed thorough a command line. Azure is a cloud service not a must have requirement.
@chudchadanstud
@chudchadanstud 5 ай бұрын
@@adamc1694 Have you actually tried setting things up without visual studio? Be honest with me now. I'm talking about all your workflow for C# without VS. Sure you can work on notepad and all in any lang but that's not usable.
@adamc1694
@adamc1694 5 ай бұрын
@@chudchadanstud VS Pro/Enterprise offers extra bells and whistles for very large teams and projects. It is not a necessity and it is not a deterrent factor not to use Blazor. In fact all these frontend.backend approaches create far far more files/directories/projects. Hence people ended up to create another solution (Docker) to fix the problem.
Is Blazor Better than Angular?
15:57
Gavin Lon
Рет қаралды 7 М.
WHY DOES SHE HAVE A REWARD? #youtubecreatorawards
00:41
Levsob
Рет қаралды 26 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 6 МЛН
¡Puaj! No comas piruleta sucia, usa un gadget 😱 #herramienta
00:30
JOON Spanish
Рет қаралды 22 МЛН
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 587 М.
The .NET 8 Auth Changes You Must Know About!
10:27
Nick Chapsas
Рет қаралды 130 М.
Why We Choose Blazor over React and Vue: Matt Jones
40:23
Techlahoma
Рет қаралды 2 М.
DevSecOps is Dead
24:11
Resourcely
Рет қаралды 1,7 М.
Is C# Better than Java?
18:41
Gavin Lon
Рет қаралды 11 М.
Is C# better than Python?
10:47
Gavin Lon
Рет қаралды 10 М.
Are we going back to PHP with fullstack JavaScript?
9:57
Maximilian Schwarzmüller
Рет қаралды 100 М.
Blazor vs React In 2024: Comprehensive Comparison Of Both
6:26
FreeTrained
Рет қаралды 10 М.
Ten Reasons Why .NET is the Best Platform for Web Development
25:38
WHY DOES SHE HAVE A REWARD? #youtubecreatorawards
00:41
Levsob
Рет қаралды 26 МЛН