You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I discovered some errors in the elmish.md walkthrough at the mount step. To be clear, when I run the tests for the final version of elmish.js as given in the repo, everything passes, so these errors are against an intermediate step in the text of elmish.md only.
Entering the code as given through the mount implementation section produces the following:
This stems from the test call to elmish.mount. It looks as if the order of the arguments to view are in the wrong order; the instances specifically are: a) the call to view in the mount function within the elmish.md text and b) in the counter.js declaration of view. The arity of the call compared to the declaration also differs.
FWIW, to fix I switched the order of the args in counter.js (the final version of elmish.js seemed to indicate that was the way). This eliminates the TypeError for 'signal not a function', but running the tests leads to another error:
The first test for the assert against the state of the counter fails, and the button seems not to be in the (js)DOM:
The view function returns a container, but it doesn't seem to be appended? When I call document.appendChild on each of the two calls to view in mount, the tests pass.
I am on Ubuntu 20.04, node 14.15.1.
The text was updated successfully, but these errors were encountered:
I discovered some errors in the
elmish.md
walkthrough at the mount step. To be clear, when I run the tests for the final version ofelmish.js
as given in the repo, everything passes, so these errors are against an intermediate step in the text ofelmish.md
only.mount
implementation section produces the following:This stems from the test call to
elmish.mount
. It looks as if the order of the arguments toview
are in the wrong order; the instances specifically are: a) the call toview
in themount
function within theelmish.md
text and b) in thecounter.js
declaration ofview
. The arity of the call compared to the declaration also differs.FWIW, to fix I switched the order of the args in
counter.js
(the final version ofelmish.js
seemed to indicate that was the way). This eliminates theTypeError
for 'signal not a function', but running the tests leads to another error:The
view
function returns acontainer
, but it doesn't seem to be appended? When I calldocument.appendChild
on each of the two calls toview
inmount
, the tests pass.I am on Ubuntu 20.04, node 14.15.1.
The text was updated successfully, but these errors were encountered: