Hacker News new | ask | show | jobs
by big_elephant 2856 days ago
hm 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
2 comments

Agreed, 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.
I 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

excellent video, thanks. custom elements are a very interesting alternative