-
-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computed properties fire when an action is emitted #446
Comments
Hey @onionhammer That definitely should not be the case unless all the properties are currently being accessed by one of your components. Would you mind creating a minimal reproduction for me on codesanbox? This will help me investigate it quicker for you. 👍 |
@ctrlplusb Thanks for the response I reproduced it in this repository: https://github.com/onionhammer/repro-easypeasy |
Thanks for the report @onionhammer The investigation into this has led me to a really great insight. I'll definitely be improving this experience, which will resolve the issue you are experiencing. As a side note though; I don't recommend putting your Also, a question regarding this. It seems that you are trying to encapsulate the Based on the answer to my question I will recommend an alternative approach. 👍 |
@ctrlplusb I've already switched to using react-query to cache results, but I'm definitely open to recommendations on how I can better use easy-peasy to do this stuff ;) My initial goal was to store the |
Using |
I'm attempting to use computed properties to preserve fetch results and
createContextStore
;I'm then consuming only 1 of the computed properties;
getSomething1
, everything works perfectly until I change the state of 'date', then all threegetSomething
(1, 2, 3) fire off fetches even though I'm only using the first one anywhere.The text was updated successfully, but these errors were encountered: