3 ms·
Check out this comment for an explanation of why Ports cannot possibly cover all use cases: https://www.reddit.com/r/elm/comments/99bzf8/elm_or_reasonml_with_re
by loevborg 8y ago
Check out this comment for an explanation of why Ports cannot possibly cover all use cases: https://www.reddit.com/r/elm/comments/99bzf8/elm_or_reasonml_with_reasonreact/e4n83jk/?context=3 https://www.reddit.com/r/elm/comments/99bzf8/elm_or_reasonml...
- big_elephant 8y agohm i'm not sure why ports would not work in that use case (the keycloak one, right?). the port would be how you communicate between js and elm, so it looks like inside the js callbacks is where you would `send` that data through the port to elm
- loevborg 8y agoAgreed, it could work with Keycloak, or other 3rd party libraries, depending on the amount of collaboration between JS and Elm. My point was that some things that are simple when you can pass around promises suddenly get very complicated when all you have is ports and messages.
- AlexCoventry 8y agoI came across an example which makes using ports sound a bit tedious (but suggests an alternative.) It's at the start of this talk: https://www.youtube.com/watch?v=tyFe9Pw6TVE https://www.youtube.com/watch?v=tyFe9Pw6TVE
- big_elephant 8y agoexcellent video, thanks. custom elements are a very interesting alternative