-
Notifications
You must be signed in to change notification settings - Fork 8
Issue: currentRoute is blank on page load #26
Comments
The https://codesandbox.io/s/svelte-easyroute-simpliest-demo-forked-i1ds8 In order to get a working |
Hello @fabien!
As for useCurrentRoute, it is not intended to return a valid Svelte store, as it refers to an Observable implemented internally by easyroute-core. It simply provides access to its value. However, I like the idea of returning the svelte-repository, and perhaps it will be implemented. But not as part of the work on this issue. In version 3.0.7, the described errors have been fixed. |
Hi @lyohaplotinka! I think it makes sense to deprecate the Thanks for the quick fix! |
Hi, first off, this router looks really promising! Nice work!
While playing around with it in a sandbox, I noticed that
currentRoute
is never populated on the initial load. It is only set when switching to another page - is this a bug? Please see the console at:https://codesandbox.io/s/svelte-easyroute-simpliest-demo-forked-2k18c
One more thing, the
beforeEach
doesn't seem to work properly either, thefullPath
is always identical on bothfrom
andto
.Another thing that I noticed is that apparently,
useCurrentRoute
currently doesn't return a plain readable Svelte store. If it did, it would make the boilerplate for each component a bit more compact (using reactive$
code), and you would not have to unsubscribe manually. Any thoughts on this?The text was updated successfully, but these errors were encountered: