-
Notifications
You must be signed in to change notification settings - Fork 286
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
Docs: don’t rely on global variable #41
Comments
I've written up some notes on this here:- The goal of this module is to provide the same API on the client as is provided on the server — it does that at the moment by defining |
No library should write anything into a global state. This is in effect memory leaking. There is no way to dereference use of Conceptual principals aside, this is just bad design. In Node.js, you are promoting use of global variables. In Browser, you are tricking the environment to think that On the bright side, you did address this in the documentation and suggested an alternative. Thumbs up for that. 👍
|
In the docs, I’d recommend the following way of using
fetch()
:I wouldn’t create a global variable in the Node.js code, either.
The text was updated successfully, but these errors were encountered: