Closed hrajchert closed 2 years ago
Thanks for the report, @hrajchert. I haven't seen this happen before.
If I'm following correctly, you have:
instantInput
that is raising an output message to some parentcurrencyInput
as inputcurrencyInput
, is undefinedI'm pressed for time this week so it's difficult for me to set up your reproduction, but I am curious what happens if you trace the value through each of those steps and pinpoint the moment in which it becomes undefined. When I have some more time I can help dig into exactly what's going on.
Hi! First of all thanks a lot for this great project, I really like the idea :).
We are running into a weird runtime exception when having 2 hooks components running side by side:
The screenshot above corresponds to the Simulation pane of a tool called Marlowe Playground. The page has 5 components called
currencyInput
(highlighted in red) and one component calledinstantInput
(highlighted in green). For some reason, if theinstantInput
raises an output thecurrencyInput
receives unexpected data (highlighted in red) which results in the runtime exception.If I comment the line that raises the output for
InstantInput
then I don't have this problemOne caveat of this project: It is using custom helpers we call sub-modules, which emulates the Elm architecture with Lenses. We made this as a way to have global state before you created halogen-store. In another project in the same repo we are not using the sub-components anymore thanks to your library <3.
Steps to reproduce
This can be reproduced in the
debug-halogen-hooks
branch of the repo. It is necessary to use nix-shell with the binaries cache preconfigured. Then follow these steps to launch the playground client (the backend is not needed for this).After the page is running on localhost, you can: