-
-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
function to overwrite global options don't update after dependency change #359
Comments
Feel free to submit a PR. |
@joaoarieira were you ever able to get around this issue, I'm also having the same problem, thanks |
Facing the same issue |
I think I resolved the issue I modified the codesandbox https://codesandbox.io/s/usefetch-use-http-todo-list-app-managed-state-forked-q72vnx?file=/src/index.js. Problem is the execution context of the options function and JavaScript variable reference Plese verify and let me know if it helps |
@krishnasaga hi,i can console new value by xxcurrent, but the value in post body is still old value, hope u can reply me thx!! |
If it is about a different issue then you need to open a new thread |
Describe the bug
I'm using a API that needs to send a dynamic value on header. But when this value changes, the function that overwrite the global options use the old value.
https://codesandbox.io/s/usefetch-use-http-todo-list-app-managed-state-forked-b6i4w?file=/src/index.js
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The overwite global options function must use updated values.
The text was updated successfully, but these errors were encountered: