8 Integrating with JavaScript libraries
This chapter covers
- Wrapping JavaScript libraries to work with Blazor
- Calling JavaScript functions from C#
- Calling C# methods from JavaScript
While one of the major reasons for choosing Blazor is to write our frontend applications using C# to avoid JavaScript, there are some things that can still only be done using JavaScript. A great example of this is accessing the browser’s web storage APIs. It’s a common requirement to store data in either local storage or session storage, but both features can be accessed only via JavaScript code. Beyond just needing to use some JavaScript out of necessity, there are also many fantastic, feature-packed JavaScript libraries available that just aren’t available in ...
Get Blazor in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.