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: https://www.pragimtech.com/blog/blazor/pass-data-from-child-to-parent-component-in-blazor/

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: https://www.syncfusion.com/faq/blazor/components/how-do-you-pass-values-from-child-to-parent-using-eventcallback-in-blazor https://docs.microsoft.com/en-us/aspnet/core/blazor/components/data-binding?view=aspnetcore-5.0#child-to-parent-binding-with-chained-bind

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: https://docs.microsoft.com/en-us/azure/storage/queues/storage-dotnet-how-to-use-queues?tabs=dotnet https://docs.microsoft.com/en-us/dotnet/api/overview/azure/storage.queues-readme-pre

Blazor and Browser Local Storage using Blazored.LocalStorage

Blazored.LocalStorage Note: This is for .NET 5.0. Example: Program.cs of Blazor Client CartStateProvider.razor in Blazor Client App.razor in Blazor Client TestCart.razor Sources: https://www.syncfusion.com/faq/blazor/general/how-do-i-access-browser-local-storage-in-blazor https://www.nuget.org/packages/Blazored.LocalStorage/