Replies: 4 comments 3 replies
-
|
Yes, it is designed to work with resources and it should work with resources. It will not create an infinite loop if it is done correctly. Are you creating the resource inside the condition check? Please provide some example code, otherwise it's not possible to help. |
Beta Was this translation helpful? Give feedback.
-
|
this is the code i tried: |
Beta Was this translation helpful? Give feedback.
-
|
i feel silly with the problems i counter with leptos 😆 |
Beta Was this translation helpful? Give feedback.
-
|
this seems to work |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
ProtectedRoute and ProtectedParentRoute require condition field of type Option
it's like resource, so i thought maybe resource could be a good option here but if i create a resource and pass it right away (in the closure) it will get a lot of errors in console (it keep trying to make a call to server in endless loop)
any comment about to pass a resource to condition field of the protected route would be appreciated (or if it's good idea in first place)
Beta Was this translation helpful? Give feedback.
All reactions