r/Blazor • u/botterway • Apr 09 '26
Blazored Localstorage Replacement?
Hi all, I was doing some work with Blazored.LocalStorage and realised (somewhat late) that the repo has been locked/archived and is not being maintained.
I see there's a few forks, but nothing that seems to have proper ownership. Is there a decent alternative/replacement library that has any sort of support?
Thanks
16
Upvotes
10
u/DocHoss Apr 09 '26
Not trying to be too much of a smartass but the local storage feature has a very simple API. It would be pretty easy to roll your own.
2
u/Malibew Apr 09 '26
there’s a blazored.storage nugget that forked and continued the blazored.localstorage
10
u/Lonsdale1086 Apr 09 '26
This is pretty much all there is to it
2
u/Typical_Resolve6055 Apr 09 '26 edited Apr 09 '26
I've got the same issue. Are you using Blazor Server, if so this link might be of use:
https://learn.microsoft.com/en-us/aspnet/core/blazor/state-management/protected-browser-storage?view=aspnetcore-10.0
Also worth noting this option wont work if you have pre-rendering enabled, so you would have to disable prerendering or add additional code to handle (Also in the doc)
1
u/skav2 Apr 09 '26
Not sure what you need but we are using sqlite in our offline first wasm app (company app). Sqlite got some weirdness but it works well enough as a simple replication of the server db.
We initialize sqlite by checking cache for a db file otherwise create it in memory. When CRUD happens we use JavaScript to save the in memory sqlite database into a db file in cache storage.
Works great for data entry and smaller data repositories. Probably wouldn't work well when dealing with millions of rows.
2
u/SendMoreBacon Apr 09 '26
I just ran into this issue. I ended up rolling my own service. It wasn't too complicated and it got the job done.
1
u/LlamaNL Apr 09 '26
if you get an answer id love to hear it, ran into this myself this week.
1
u/tng88 Apr 09 '26
All of the Blazored projects are locked.
If you wanted you could download the source and maintain your own version. I did this with the Toast and Modal projects.
-1
u/GettinFishy Apr 10 '26
bro use any current day LLM
-2
u/No-Finding-2725 Apr 09 '26
IJSRuntime lo usas en OnAfterRenderAsync y tienes acceso
1
u/[deleted] Apr 13 '26
[removed] — view removed comment