Home
Day 7: context menu, file delete
part of Diary of a solo dev building a web app
Jun 15, 2022
💡
This is a dev diary of implementing Filerion, a web-based file manager for online storage (Dropbox, OneDrive, Google Drive, s3 and more).
Today:
export const viewportSize = writable(); // {dx, dy}
export const viewportWidth = writable();

function updateAfterResize() {
  const dx = window.innerWidth;
  const dy = window.innerHeight;
  viewportSize.set({ dx: dx, dy: dy });
  viewportWidth.set(dx);
}

window.addEventListener("resize", debounceEvent(updateAfterResize, 250));
This is a little bit more work (not much more) but the only way to get the fastest possible application is to write the smallest amount of code. My code is smaller not because I’m a better programmer but because I only took the part of svelte-window-store that I need in my app.
Jul 10 2022

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you: