porkbuns / shmile

The DIY photobooth, at your service.
75 stars 39 forks source link

Factor out global vars in Node app #28

Open andrewhao opened 9 years ago

andrewhao commented 9 years ago

Stuff like this makes peoples' eyes burn:

State = image_src_list: []

Factor out the global and instead pass it around as inputs to the system.

andrewhao commented 9 years ago

A side effect of this manifested in #34.

Suggest we pass an immutable data object between function calls and callbacks in place of maintaining a global State object.