Howβs it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK π¬π§
Education
10 plus years* active enterprise development experience and a Fine art degree π¨
I thought globalThis has more to do with context of environment. The title of this post is a bit misleading in a way.. kind of, this bleeding out to a global scope is an unfortunate accident in my book rather than explicit intention using window or module or global etc. Maybe stop using this to target the global scope.
Howβs it going, I'm a Adam, a Full-Stack Engineer, actively searching for work. I'm all about JavaScript. And Frontend but don't let that fool you - I've also got some serious Backend skills.
Location
City of Bath, UK π¬π§
Education
10 plus years* active enterprise development experience and a Fine art degree π¨
'Stop using global variables and if you have to, think about if your code is isomorphic, then if it is use globalThis'. It's a bit wordy. Sorry I think your title is better.
I thought globalThis has more to do with context of environment. The title of this post is a bit misleading in a way.. kind of,
this
bleeding out to a global scope is an unfortunate accident in my book rather than explicit intention using window or module or global etc. Maybe stop using this to target the global scope.Hmm this is why I added the "for global variables".
I thought this would be enough?
What would be a better title?
'Stop using global variables and if you have to, think about if your code is isomorphic, then if it is use globalThis'. It's a bit wordy. Sorry I think your title is better.
haha, that's the problem with title :D
Coming up with a good title is an art.
And I'm bad at it :D