At the moment when PGlite is loading asynchronously, the UI has to wait. Otherwise anything using usePGlite() causes an error:
Uncaught Error: No PGlite instance found, use PGliteProvider to provide one
I can't easily wrap it in a try/catch because this is a hook.
Could usePGlite() just return null so the UI can handle around it until the DB loads?
Thanks!
At the moment when PGlite is loading asynchronously, the UI has to wait. Otherwise anything using
usePGlite()causes an error:I can't easily wrap it in a try/catch because this is a hook.
Could
usePGlite()just returnnullso the UI can handle around it until the DB loads?Thanks!