1

I'm now getting into Blazor and wanted to understand if there's any benefits to using certain Blazor components such as DatePicker or Chart from third party vendors versus using some JS based solutions?

I know that the JavaScript Interop allows Blazor apps to use JS solutions so both Blazor component and JS options would be available to me but wanted to understand if there's any advantage in using Blazor components.

P.S. I have a little hesitance to use third party Blazor components. One small observation so far is that the DatePicker component by Radzen actually did not open the date picker on my iPhone. This doesn't help overcome my hesitance to use Blazor components vs the JS option. Here's the link to this component: https://blazor.radzen.com/datepicker

3 Answers 3

2

The only advantage you get is - it saves your man hours other wise you need to invest to build exactly what the third party components do. Other than that there is no other perceived benefits. If you have all the time in the world to sit and code a component, take care of all scenarios that the component needs to support, bug fix etc. - by all means you can do that. Radzen is one of the popular free open source blazor component library. Having said that you will need to first make a thorough evaluation of the library for your situation and then decide whether you want to use it or not. If you find a bug - go raise a issue on its Github repo and help them out.

Sign up to request clarification or add additional context in comments.

6 Comments

Thank you for the answer. I’d like to focus more on what I can get done through JS and not so much on third party components. There are so many mature JS solutions such as date pickers, select2, etc. I’m trying to see if it’s challenging to use them in Blazor which may make Blazor components an attractive alternative.
@Sam - The main challenges you will come up against in trying to create a hybrid environment is input State. JS will make changes to the DOM that will not be reflected in the Blazor Renderer DOM. Things will inexplicably revert to old values, won't update,..... Like Benny in the other answer, I'm no great fan of third party libraries: they very quickly feel like straightjackets!
Wouldn't you consider the JS date pickers and select2 as 3rd-party components, @Sam? I'm trying to figure out why you consider them so different from Radzen. Maybe the difference is that Radzen is a complete library of components, and you'd rather be able to pick and choose the individual pieces. Nothing wrong with that, I suppose.
@MrCakaShaunCurtis That's exactly what I was trying to understand. I'm just getting into Blazor now so I'm trying to prepare myself for gotcha's. I need to better understand how Blazor handles the DOM. Thanks.
@EricKing You're definitely right that a JS solution is also a third party one and I share your feelings about using third party solutions. I've just switched from React Native to Xamarin precisely because of that. Because RN gives you very very little out of the box, one ends up depending way too much on third party solutions and I simply couldn't get my RN apps to be stable enough. It was always some third party npm package throwing a monkey wrench in to my solution. Having said that I once wrote a date picker in JS from the ground up and it was literally reinventing the wheel.
|
1

For me, using 3rd-party components of any flavor is a waste of time. Why try to get Radzen (or anything else) working the way I want, when Blazor makes it so easy just to create my own components? Trying to "save time" by fitting other people's work into my own projects robs me of my agency over the project, and generally leads to hours (or days) asking "How to I get ABC to do XYZ"?

The only component I know for sure I'd need 3rd-party would be an HTML editor. I just don't have the time for that.

ALSO-- a big part of custom libraries was difficulty doing anything cool in HTML in the past. But current HTML, current browsers, and the current state of Blazor, so much "just works" out of the box.

Comments

1

I'd prefer to use stable Blazor components rather than trying to adapt current JS components into Blazor, because it'd take a lot more time and it's error prone

I've used Radzen and MudBlazor, and I think Radzen has more components available but MudBlazor looks prettier. MudBlazor has a preview (beta) datagrid and there would be breaking changes on further releases while Radzen datagrid is in stable version. Both datagrids offer server side pagging.

In any case, both suites could speed up the development time, but you'd have to invest some time to learn how to use them. Just pick one and start learning.

I've added both suites in a Blazor wasm project and they seem to work fine together, I used MudBlazor as first choice and I pick up missing/stable components from Radzen like datagrid or file uploader. The drawback of using both suites is a bigger download size, but I trust in the browser cache.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.