RSS Amplifier

Krister's coding adventures · Apr 9, 2020

onMount doesn't fire Sapper/Svelte

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

I only have two pages A links to B. Both have a preload of data. So I load A, everything is nice. Click on the link to B and voila - the new layout and everything, but the onMount from A renders components into page B. WTF? What happened? Turns

onMount doesn't fire Sapper/Svelte

I only have two pages A links to B. Both have a preload of data. So I load A, everything is nice. Click on the link to B and voila - the new layout and everything, but the onMount from A renders components into page B. WTF? What happened?

Turns out I had a small error in onMount A, which caused the app to get confused. I don't know why or how. Just make sure you handle all errors on onMount.

Took me 4 hours today. Since problem was only in production and I couldn't reproduce it. Eff..

Read on code.krister.ee

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.