Hmmm, I've been using indexeddb via Dexie.js.
All of my relay handling routines store events into Dexie and then my UI is generated off from Svelte/Dexie LiveQueries from DB changes.
This conceptually keeps relays separate from ui, and works well for PWAs. Probably not the fastest though.