ciscoheat / sveltekit-flash-message

Send temporary data after redirect, usually from endpoints. Works with both SSR and client.
https://www.npmjs.com/package/sveltekit-flash-message
MIT License
246 stars 5 forks source link

endless re-rendering for beforeUpdate #1

Closed rburgst closed 1 year ago

rburgst commented 1 year ago

If I add the beforeUpdate hook in the layout file

  beforeUpdate(() => updateFlashMessage(session))

I get constant re-rendering once the server sets the cookie.

I am using

        "@sveltejs/kit": "1.0.0-next.369",
ciscoheat commented 1 year ago

Hi, thanks for reporting this! I have just made some larger modifications, so can you upgrade to the latest version and see if it resolved? If not, try upgrade the sveltekit version as well, I'm using next-405 and it works fine there.

ciscoheat commented 1 year ago

Even more updates now, so please try them out. :)

The behavior has changed in the latest version, so a redirect is required now for the library to work.

rburgst commented 1 year ago

ok, this package has changed a lot since back then, I guess we can close it

ciscoheat commented 1 year ago

Yes, I was just about to write that. :) It had a complete overhaul due to the route changes in sveltekit.