JavaScript and Blazor without index.html reference

JavaScript Isolation in Blazor WebAssembly From the .NET 5 (RC 1) version, we are able to isolate our JavaScript code as a standard JavaScript module. This is beneficial because We no longer have to add our JS functions to the global window namespace We don’t have to manually import JavaScript files in the index.html file myscript.js Razor... » read more

PWA and Caching

Control asset caching If your project defines the ServiceWorkerAssetsManifest MSBuild property, Blazor’s build tooling generates a service worker assets manifest with the specified name. The default PWA template produces a project file containing the following property:XMLKopiëren The file is placed in the wwwroot output directory, so the browser can retrieve this file by requesting /service-worker-assets.js. To see the contents of... » read more

Forcing reload of Blazor client after publishing changes

Since your app is a PWA, you can declare a js file for registration in the navigator.serviceWorker object. This my.js file can contain a const CACHE_VERSION = 1.0. Updating this value should force the client to download the latest files. See Jeremy Likness’ blog post for more info. Example: service-worker.published.js Note: The original one does not work. Replace self.assetsManifest.version... » read more

Pass data from child to parent component in blazor

Child component to parent component communication The parent component assigns a callback method to the child component’s event. In Blazor, to expose an event we use EventCallback. Sources:

Blazor Component: Pass value from child to parent

To pass values from a child to a parent component, see the following. Parent component Child component Sources:

Azure Storage Queue Examples

Install Install following from Nuget Package Manager Azure.StorageQueues Add following reference… Add Message To Queue Note: Call to queue is not supported in Blazor Web Assembly. You will get this error message if you try to create a message. System.Security.Cryptography.Algorithms is not supported on this platform. Sources: