Skip to content

Tag: promise

Understanding Promise() for Controlling when Form Inputs are Displayed

I have certain form inputs that are only displayed depending on other input’s value. I am trying to control when inputs fadeOut() and fadeIn() with, I think, a promise() but it seems the call-stack still runs everything synchronously – maybe I am not configuring the promise correctly? Here is some pseudo code. The catch here is one of my inputs,

Retrieve value from IndexedDB using Dexie and Svelte

I don’t understand how I can get a value from IndexedDB using Dexie. Database is all good in ‘application’ tab in inspect tool. Total newbie, so please be understanding. My db.js App.svelte Whatever I try, object with daysMax={total} outputs undefined, [object Object] or something like [Dexie object Object]. I just want to get 20 from db, as seen in db.js: