-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
useLazyFetch does not work with reactive values #1135
Comments
hey @wattanx thank you for your quick response to this issue. When do you think your pull request will be resolved? It seems good and I would love to start using this :) |
This is a big change and we are checking it carefully. It will take a little longer to release. |
@wattanx, I found a BUG, you fixed it, all are happy, but not untill this ticket is merged and closed. I dont understand why it already isnt.. |
If you want a quick fix, use Please read the following statement as to why we do not merge immediately. |
Thank you! I solved my issue by |
Environment
Reproduction
Nuxt3 working example
Nuxt + bridge not working
Describe the bug
I want to use reactive values in useLazyFetch function, but nuxt bridge seems to not support this.
`const username = ref("");
const password = ref("");
const queryParams = computed(() => ({
username: username.value,
password: password.value,
}));
const { data, pending, error, refresh } = useLazyFetch("/login", {
query: queryParams
});`
I tried to use not computed, but refs. Seems to work => values are updated after every send request, but it sends not the value itself but object {value: 'value of input'}
`const username = ref("");
const password = ref("");
const { data, pending, error, refresh } = useLazyFetch("/login", {
query: {
username: username,
password: password,
}
});`
In nuxt3 version all working fine, so there must a bug in bridge version of function useLazyFetch.
Additional context
No response
Logs
logs are in reproduction links
The text was updated successfully, but these errors were encountered: