We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hot loading loses effect after modifying the window.fetch method.
(Write your answer here.)YES
(Write your answer here if relevant.)
windows package info:
"@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1",
(Write your steps here:)
import CloudUtils from './CloudUtils'; const oldFetch = fetch; const newFetch = (url, options) => { const token = CloudUtils.getToken(); const headers = options.headers || new Headers(); headers.append('Authorization', `bearer ${token}`); options.headers = headers; return oldFetch(`${url}`, options); }; if (window) { window.fetch = newFetch; window.oldFetch = oldFetch; }
(Write what you thought would happen.) Hot reload not work!
(Write what happened. Please add screenshots!)
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Hot loading loses effect after modifying the window.fetch method.
Did you try recovering your dependencies?
(Write your answer here.)YES
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
windows
package info:
Steps to reproduce
(Write your steps here:)
Expected behavior
(Write what you thought would happen.)
Hot reload not work!
Actual behavior
(Write what happened. Please add screenshots!)
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
The text was updated successfully, but these errors were encountered: