Blazor Server in .NET 6 - Part 5 HttpClient

Blazor Server in .NET 6 – Part Five

Ryan Flachman .NET, Articles, Blazor, Blazor Server in .NET 6 Series, C#, Development Technologies & Tools, Tutorial Leave a Comment

In the final part of the Blazor Server in .NET 6 blog series, we covered how to use data binding and dropdowns with lists and enums. This included a short introduction to setting up an HttpService, making a get call to the API, and viewing the results as a string. For further clarity, I also included a demonstration on how to add an HttpService that uses the built-in .NET HttpClient class to make calls to the D&D 5e API!

Finally, I presented a way to add a dropdown with the available race options that our character can choose from. That concludes my five-part educational series on Blazor Server in .NET 6. I hope you enjoyed it, and learned a little something you can take with you. Thanks for tuning in!

Blazor Server in .NET 6 - Part Four - Blazor Components

Blazor Server in .NET 6 – Part Four

Ryan Flachman .NET, Articles, Blazor, Blazor Server in .NET 6 Series, C#, Development Technologies & Tools, Tutorial Leave a Comment

In Part 4 of the Keyhole Blazor Server in .NET 6 series, we covered adding events in our Blazor components. In sum, I demonstrated how to add a service that contains the events that components can listen to with methods to notify when to invoke our events.

After that, we added that service to the BaseComponent. The section is complete with adding the new character to our list of current characters in storage in order to notify all listening components of this event.

I hope youโ€™re enjoying working with Blazor as much as I do so far. See you in part 5, the final part of the blog series, for how to use dropdowns and data binding using both lists and enums!

better sort in JavaScript

Better Sort Ordering in JavaScript

Lou Mauget Articles, Development Technologies & Tools, JavaScript, Programming, Tutorial 2 Comments

In this post, I show how to cajole Array.sort() into producing the following order. This: [Item 1, Item 2, Item 100] instead of this…[Item 1, Item 100, Item 2].

The answer is to pass the sort function a comparator argument from the International Collator built into every major browser and Node.js. This approach is simple and declarative for lists of flat strings. The comparison function arguments default to each string being compared. For sorting objects such as a list of dropdown choices, just pass a pair of the sort field drill-downs to the comparison function.

State-Management-with-React-Recoil

React and Recoil for State Management

Alex Cassells Articles, JavaScript, Programming, React 1 Comment

In this blog, Iโ€™ll focus on one tool you might use for State Management, Recoil. First, weโ€™ll look at why State Management is an effective strategy in general. Then, weโ€™ll turn our attention to Recoil, and finally, weโ€™ll dive head first into a demo. By the end, you should have all the tools necessary to begin using Recoil on your own!

Blazor Server in .NET 6 - Part 3 - Radzen Blazor

Blazor Server in .NET 6 – Part Three

Ryan Flachman .NET, Articles, Blazor, Blazor Server in .NET 6 Series, C#, Development Technologies & Tools, Tutorial Leave a Comment

In part 3 of the Keyhole Blazor Server in .NET 6 series, we installed a free component library called Radzen.Blazer, updated the CharacterInfo component to easily display a Create Character modal, and added the RadzenDialog as a way to standardize our dialog with an easy-to-use component. In the next blog, we will be adding events in our blazor components. See you in part 4!