Skip to content
Discussion options

You must be logged in to vote

Based on the way you have written this code, this is expected behavior: Effect runs for the first time on the next "tick," after the page is rendered and mounted.

You should consider using ProtectedParentRoute for this behavior, or removing Effect::new() so that the code to check the route runs immediately. (I see you want it to run whenever the pathname changes, which make sense)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zelds
Comment options

Answer selected by zelds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants