Question: Can I send some data when using navigate?

This issue has been tracked since 2021-04-23.

Say I want to navigate the user to the login page because the token is now invalid. I would like to show a popup for the same on the login page. So can I send some data while navigating or should I just use URL parameters?

itsfarseen wrote this answer on 2021-04-25

There is a state argument that you can pass to navigate. I think you will be able to access it using history.state (https://developer.mozilla.org/en-US/docs/Web/API/History/state)

More Details About Repo
Owner Name EmilTholin
Repo Name svelte-routing
Full Name EmilTholin/svelte-routing
Language JavaScript
Created Date 2017-11-28
Updated Date 2022-12-03
Star Count 1711
Watcher Count 21
Fork Count 151
Issue Count 59

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date