You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs for lazy query say that if you need the immediate access to the result you should call .unwrap() however, this returns the cached value instead of the result of the lazy query. Is there a way to await the value of the newly initiated fetch?
The text was updated successfully, but these errors were encountered:
maxkostow
changed the title
Is there a way to access the "currentData" of lazy query?
Is there a way to access the "currentData" of lazy query trigger result?
Dec 2, 2024
I believe false is the default value for preferCacheValue (the docs say to pass true "if you want it to immediately return a cached value if one exists"). I updated the example to pass false and it exhibits the same behavior.
See this example: https://codesandbox.io/p/sandbox/xenodochial-river-p9d6nj which demonstrates that the lazy unwrap returns the cached value.
The docs for lazy query say that if you need the immediate access to the result you should call
.unwrap()
however, this returns the cached value instead of the result of the lazy query. Is there a way to await the value of the newly initiated fetch?The text was updated successfully, but these errors were encountered: