porkbuns/shmile

Factor out global vars in Node app

Opened this issue · 1 comments

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.

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.