learn-elm-architecture-in-javascript
learn-elm-architecture-in-javascript copied to clipboard
Remove the callback()
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.
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 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. 👍