cozy / cozy-emails

Email Client for Cozy
GNU Affero General Public License v3.0
66 stars 41 forks source link

[Refactor] Prefer modules to globals #828

Closed misstick closed 8 years ago

misstick commented 8 years ago
m4dz commented 8 years ago

Seems a good direction for me, just 2 questions:

  1. I'm not especially fan that the flux lib exposes a singleton (especially when we'll want to do tests on dispatchers), maybe let application create a new dispatcher at initialization and then require it should be a better solution?
  2. The only global env that seems legit for me is the __DEV__ one. Not sure replacing it by an isDev() util is really a KISS way…
misstick commented 8 years ago

@m4dz : I'm OK for the singleton, but as it is a temporary situation, I think we could wait to change this when add a framework based on Flux

m4dz commented 8 years ago

If it won't break our (poor) tests stack, go to let it as it and: 1/ fix it later if needed or ; 2/ trash it when going to Redux. Thanks!