Message from JavaScript discussions

April 2019

— It won't, since you are mutating it


Between react, vue and angular which one should study? I read that Vue is becoming more and more used

— ❤️

— TRGWII it's not ok if I have an object called


that will be globally available and will adopt to the player's choices?
I feel like without it I can't get anything done

Message permanent page

— Or I make Game an object instead of a class with constructor

— And then there will be a class Saves that will export all the progress.

— When is it ok to have global stuff in code?

— Never!

— If you want a global called saves, it should be an argument to the constructor instead

— That makes it an injected dependency instead of a global

— And the Game class can just do:
constructor(save) { = save;
// ...

— And refer to when it needs to add some data to it or something