Replies: 2 comments 4 replies
-
Here is the behavior of these two primitives:
This means that, because your effect depends on both your signal and your resource, it is notified twice: once when you change the signal, and once when the resource resolves. |
Beta Was this translation helpful? Give feedback.
4 replies
-
With this crystal clear explanation of the Resource-Effect relations I flag the "use separate Effects" as the answer to my problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
SSR
leptos = { version = "0.7.2" }
The setup
Problem observed:
Question about "on signal change":
What might be good way:
Resource is triggered first and consequent resource.get() in Effect would return None for that Option till resource loaded
General question:
I am sure this is pretty common problem and I might just overlooked something.. What I need is just a way to await for resource to be loaded in the Effect.
The result:

The current working solution.
Just use Resource reactivity without Effect
Which is not without problem though:
Beta Was this translation helpful? Give feedback.
All reactions