learn-elm-architecture-in-javascript icon indicating copy to clipboard operation
learn-elm-architecture-in-javascript copied to clipboard

Remove the callback()

Open idkjs opened this issue 8 years ago • 2 comments

Removing the callback might not be a simple thing for some beginners. Edit suggestion below:

  function signal(action) {          
    // return function callback() {     // comment out to remove callback 
      model = update(model, action); 
      view(signal, model, root);     
    // };                               // comment out to remove callback.
  };

Then refresh the browser and check the console.

idkjs avatar Sep 19 '17 19:09 idkjs

Also "However this if the "handlers" for each action were "bigger", we would split them out into their own functions e.g:" Is a typo. I tried to link to the line, but there are no line numbers in the readme to link too...

idkjs avatar Sep 19 '17 20:09 idkjs

@idkjs thanks for opening this issue and making this suggestion. have you tried removing the callback? what was the effect? if you have time to create a Pull Request, please do. thanks. 👍

nelsonic avatar Oct 31 '17 08:10 nelsonic