Is Blazor Better than React?

Поділитися
Вставка
  • Опубліковано 31 тра 2024
  • 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 7 місяців тому +64

    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  7 місяців тому +2

      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 місяців тому +3

      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 місяців тому +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 3 місяці тому +4

      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 місяців тому +81

    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 місяців тому +14

      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 місяців тому +6

      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 9 днів тому

      @@user-vi7xn1tj9f same with react and other js frameworks

  • @dirkschannel5817
    @dirkschannel5817 7 місяців тому +55

    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  7 місяців тому +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 7 місяців тому

      @@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 місяців тому +4

      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 ?

  • @ManInTheFridge
    @ManInTheFridge 5 місяців тому +12

    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.

  • @CRBarchager
    @CRBarchager 7 місяців тому +16

    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  7 місяців тому +2

      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.

  • @ChristianHowell
    @ChristianHowell 6 місяців тому +13

    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 місяців тому +1

      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 місяців тому +1

      @@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...

  • @atpayero
    @atpayero 7 місяців тому +6

    excelent Video, In my case I prefer Blazor because and can only use C# for Front end and Back end.

    • @GavinLon
      @GavinLon  7 місяців тому +1

      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! :)

  • @knload
    @knload 19 днів тому

    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  19 днів тому +1

      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 19 днів тому

      @@GavinLon Thanks for the reply, I appreciate it.

  • @ALKASHIF-
    @ALKASHIF- 4 місяці тому +3

    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 місяці тому +4

    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 місяці тому +1

      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 Місяць тому +1

      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 Місяць тому +1

      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.

  • @Ziron2008
    @Ziron2008 3 місяці тому +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

  • @MatinDevs
    @MatinDevs 6 місяців тому +14

    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.

  • @simonel-zawahri640
    @simonel-zawahri640 5 місяців тому +3

    Yes. Next question😊

  • @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?

  • @RemiThomas
    @RemiThomas 6 місяців тому +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 місяців тому +1

      @@GavinLon Yes but that was before .Net 8 Release that changed everything.

  • @xeoneraldo1254
    @xeoneraldo1254 7 місяців тому +2

    Blazor WASM is compatible backwards even on browsers that dont support web assembly, like Internet Explorer thru polyfill

    • @GavinLon
      @GavinLon  7 місяців тому

      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 місяці тому +1

    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 7 місяців тому +6

    Both are great, in the end it depends on your needs, and the next.js framework is also great.

    • @GavinLon
      @GavinLon  7 місяців тому +2

      Yes, I want to do a video on Next.js - it is also a great framework! :)

    • @markcooke4866
      @markcooke4866 6 місяців тому +2

      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.

  •  7 місяців тому

    Good one! 👍

    • @GavinLon
      @GavinLon  7 місяців тому

      Thank you! :)

  • @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 місяців тому +5

      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.

  • @DevLearn-lv7nr
    @DevLearn-lv7nr 3 місяці тому +2

    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

  • @mhmohammadi9652
    @mhmohammadi9652 7 місяців тому +2

    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  7 місяців тому +1

      Great to see so much love for Blazor! Thanks for your comment! :)

  • @saberint
    @saberint 5 місяців тому +2

    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 місяців тому +1

      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 місяців тому +1

      @@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

  • @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 місяців тому +1

      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! :)

  • @kourosh234
    @kourosh234 2 місяці тому +1

    The answer is simply: YES

  • @fredbolli4704
    @fredbolli4704 2 місяці тому +3

    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.

  • @mazingguitar
    @mazingguitar 6 місяців тому +1

    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 2 місяці тому

      @@daaa57150 I prefer vuejs, turned out way more friendly for me.

  • @bryanpaderes8963
    @bryanpaderes8963 7 місяців тому +1

    Great video, as always❤

    • @GavinLon
      @GavinLon  7 місяців тому

      Thank you! :)

  • @SpatioTemporalEntity
    @SpatioTemporalEntity 28 днів тому

    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  28 днів тому

      It definitely ticks all the boxes! I agree, Blazor is great!

  • @CodySkidmorenh
    @CodySkidmorenh 14 днів тому

    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  14 днів тому

      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.

  • @X3noic
    @X3noic 5 місяців тому +1

    short answer, YES!

    • @GavinLon
      @GavinLon  5 місяців тому +1

      Another one for the Blazor team. Excellent!

  • @rankarat
    @rankarat 7 місяців тому +4

    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  7 місяців тому +1

      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 7 місяців тому

      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  7 місяців тому

      @@PortalUser2 Wow -thanks for your detailed comment - I'm sure this will be helpful and informative to many viewers.

    • @rankarat
      @rankarat 7 місяців тому

      @@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 { ... }
      }

  • @betterlifeexe4378
    @betterlifeexe4378 7 місяців тому +55

    Yes, yes it is. JavaScript is a mess.

    • @GavinLon
      @GavinLon  7 місяців тому +7

      Cool - one for the Blazor team! :)

    • @wegene2056
      @wegene2056 7 місяців тому +3

      yes, but blazor low number of community is my main problem.

    • @GavinLon
      @GavinLon  7 місяців тому +8

      @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 7 місяців тому +1

      @@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 7 місяців тому

      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

  • @timmyers9798
    @timmyers9798 6 місяців тому +5

    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 місяців тому +1

      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 місяців тому +2

      Blazor just needs more time, React has had multiple years head start. .NET 8 is a game changer.

  • @farrukhmalik932
    @farrukhmalik932 3 місяці тому +1

    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!

  • @farrukhmalik932
    @farrukhmalik932 3 місяці тому +1

    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.

  • @godfreykuboi6809
    @godfreykuboi6809 7 місяців тому +1

    Blazor for me is the way to go

    • @GavinLon
      @GavinLon  7 місяців тому

      Another point for the Blazor team! :)

  • @seanweb0007
    @seanweb0007 5 місяців тому

    "Your tearing me apart!" 🤣🤣🤣🤣

  • @xxXAsuraXxx
    @xxXAsuraXxx 6 місяців тому +1

    Blazer looks nice. But I don’t think it can do micro front end or embedded spa

    • @GavinLon
      @GavinLon  6 місяців тому +1

      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

  • @kuhaniresti
    @kuhaniresti 6 місяців тому

    i'm listening

  • @alexhardy09
    @alexhardy09 7 місяців тому +3

    Blazor with mudblazor just enough

    • @GavinLon
      @GavinLon  7 місяців тому

      Mudblazor is great! :)

    • @alexhardy09
      @alexhardy09 7 місяців тому

      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  7 місяців тому

      @@alexhardy09 That's awesome! :)

  • @RonnieSunde
    @RonnieSunde 6 місяців тому +1

    This video had lots of potential, but failed at comparing properly.

    • @DerClaudius
      @DerClaudius 6 місяців тому

      Agree... waited for the explanation what the equivalent of JSX would be in blazor..

  • @miketob2005
    @miketob2005 5 місяців тому +1

    Great content, but the cartoons are out of sync from the narration and that is VERY distracting

    • @GavinLon
      @GavinLon  5 місяців тому +1

      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 :)

  • @chrislunar8214
    @chrislunar8214 5 місяців тому +1

    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.

  • @michacuranda5603
    @michacuranda5603 7 місяців тому +2

    So you just fed your recordings to an AI and you're using it to read your scripts?

    • @richardaubin1951
      @richardaubin1951 7 місяців тому

      I've mentioned this to him before, but he claims it's 100% him.

    • @GavinLon
      @GavinLon  7 місяців тому +2

      Not true! I do not use AI in my videos at all!

    • @ghevisartor6242
      @ghevisartor6242 6 місяців тому

      what difference does it make if he did?

  • @daaa57150
    @daaa57150 5 місяців тому +1

    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 місяців тому +1

      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. :)

  • @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 :)

  • @dovh49
    @dovh49 6 місяців тому +2

    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 місяців тому +1

      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 місяців тому +2

      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!

  • @caseyspaulding
    @caseyspaulding 7 місяців тому +8

    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  7 місяців тому +3

      Absolutely! They are both awesome technologies but I do love being able to code interactive browser functionality in C#! :)

    • @caseyspaulding
      @caseyspaulding 7 місяців тому

      That is nice. It just comes down to right tool for the job

  • @ThushanVithana
    @ThushanVithana 5 місяців тому +2

    Yes, Blazor is Better than React

    • @GavinLon
      @GavinLon  5 місяців тому

      Thanks for your comment. Great to see that there is plenty of love for Blazor! :)

  • @benjaminng8882
    @benjaminng8882 7 місяців тому +1

    A lot of frameworks better then React but still, a lot of companies choose to use React

    • @GavinLon
      @GavinLon  7 місяців тому

      True, I like React but as you say there are better technologies out there.

  • @Mo-ef9yt
    @Mo-ef9yt 2 місяці тому

    With React you will have to install many programs.

  • @jluisxp8553
    @jluisxp8553 6 місяців тому +1

    Personally, I prefer Blazor than React because the learning curve is less in Blazor....

    • @GavinLon
      @GavinLon  6 місяців тому +1

      I agree I also think Blazor is pretty easy to learn :) Learning JSX and hooks in React, can make that learning curve quite steep.

  • @count_of_pizza
    @count_of_pizza 6 місяців тому +1

    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 місяців тому +1

      blazor is much easier for c# devs

  • @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 місяці тому +1

    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 7 місяців тому +1

    Microsoft prefers to use React over Blazor

  • @cagrsakaoglu5589
    @cagrsakaoglu5589 5 місяців тому

    Simple answer: No

    • @GavinLon
      @GavinLon  5 місяців тому +1

      Fair enough. Thank you for your comment. :)

  • @RogueTravel
    @RogueTravel 7 місяців тому

    React can target mobile apps and they use native components. There is no equivalent out there in the market.

    • @Mimmsanfrostborned
      @Mimmsanfrostborned 7 місяців тому +5

      Blazor does the same.

    • @RogueTravel
      @RogueTravel 7 місяців тому

      @@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 місяців тому +1

      @@RogueTravel how come I have accomplished the same?

  • @Dimkar3000
    @Dimkar3000 6 місяців тому +1

    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  6 місяців тому

      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 6 місяців тому

      @@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  6 місяців тому +1

      @@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

  • @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 місяців тому +1

      @@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.

  • @kaihusravnajmiddinov5413
    @kaihusravnajmiddinov5413 6 місяців тому +1

    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 місяців тому +1

      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 місяців тому +1

      @@GavinLon agree sir.