Sign Up
Go Pro Sign Up Login

Buy Now and unlock this series

$

49

.99

yours forever

Become a Pro and unlock everything

$

24

.99

per month

Loading in Depth

Here we will take an in-depth look at the loading page. We will learn how to take care of redirects and display error messages when a page is not found or does not load as expected.

Downloads

Become a pro to download code and videos

Comments

Amy

about 1 month ago [edited]

@Jon OR anyone... any idea why it would work in dev but not live?

Mike

about 1 month ago

But why though, is there some missing reactivity concept one hasn't unlocked by this point?

User avatar

Spenser

3 months ago

@Lee thanks bucko. I was complaining about this on the last lesson. Saved me a lot of Googling.

User avatar

Lee

3 months ago [edited]

@Jon Your suggesting of altering [slug].svelte and replacing <Post /> with <svelte:component this={Post} /> worked for me too. At least on dev server, haven't tried deploying yet.

Jon

3 months ago [edited]

@Raul SOLVED: Had I been looking at my terminal I would have seen this before. I changed the component call to <svelte:component this={Post}/> and everything is working as expected now. 🙌 .....

🤦‍♂️ except when it's pushed and deployed. Works on dev server - not live. Lol. But it hella fun figuring it out. 😄

Jon

3 months ago

@Raul Thanks I’ll double check again. Although the issue was occurring in the video as well - but I’ll try downloading and running / comparing there. Cheers 😀

User avatar

Raul

3 months ago

@Jon I'd check if the path you are being redirected from /posts/postName is correct, if its not check your layout file as its probably an issue with the value you are passing as href. You can also download the code for this episode and compare with your code to see where the problem is 🙂

Jon

3 months ago [edited]

I am struggling with the last 15 seconds of the video. After correcting the layout file to include /posts - although the url changed the post did not. Clicking on the goodbye post loaded it - but from within the goodbye post clicking the hello post changed the url but the post did not load. I'm struggling to understand why that it happening. (It is in my code as well) UPDATE: I added a "posts" link in the Header and if I am in a post and click to go back to /posts - and then select another blog post it loads but only from the /posts not from the /posts/postName.

Want to join the conversation?

Become a Pro member today!