Closed nelsonic closed 6 years ago
While re-reading the code (and preparing for "elmish") It occurred to me that we might be over-complicating things ...
Do we need an init function to initialise the DOM in: https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/814467e81b1b9739da74378455bd12721b096ebd/examples/counter-reset/counter.js#L69-L85 e.g: https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/075c4c438acda3cc0e6c04fe530b161c4a6c7db5/test/counter-reset.test.js#L10
init
If we use https://github.com/rstacruz/jsdom-global in our tests, we should not need an init function. I'm going to experiment with updating the counter-reset tests and see if I can remove the init function completely.
counter-reset
Testing this now so I can simplify #44
Removed it. simplified code. stoked.
While re-reading the code (and preparing for "elmish") It occurred to me that we might be over-complicating things ...
Do we need an
init
function to initialise the DOM in: https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/814467e81b1b9739da74378455bd12721b096ebd/examples/counter-reset/counter.js#L69-L85 e.g: https://github.com/dwyl/learn-elm-architecture-in-javascript/blob/075c4c438acda3cc0e6c04fe530b161c4a6c7db5/test/counter-reset.test.js#L10If we use https://github.com/rstacruz/jsdom-global in our tests, we should not need an
init
function. I'm going to experiment with updating thecounter-reset
tests and see if I can remove theinit
function completely.