{"action":"created","issue":{"url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/28","repository_url":"https://api.github.com/repos/elm-lang/virtual-dom","labels_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/28/comments","events_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/28/events","html_url":"https://github.com/elm-lang/virtual-dom/pull/28","id":164593156,"number":28,"title":"Allow custom nodes access to the eventNode","user":{"login":"roman","id":7335,"avatar_url":"https://avatars.githubusercontent.com/u/7335?v=3","gravatar_id":"","url":"https://api.github.com/users/roman","html_url":"https://github.com/roman","followers_url":"https://api.github.com/users/roman/followers","following_url":"https://api.github.com/users/roman/following{/other_user}","gists_url":"https://api.github.com/users/roman/gists{/gist_id}","starred_url":"https://api.github.com/users/roman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman/subscriptions","organizations_url":"https://api.github.com/users/roman/orgs","repos_url":"https://api.github.com/users/roman/repos","events_url":"https://api.github.com/users/roman/events{/privacy}","received_events_url":"https://api.github.com/users/roman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-07-08T18:49:32Z","updated_at":"2016-07-15T12:24:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elm-lang/virtual-dom/pulls/28","html_url":"https://github.com/elm-lang/virtual-dom/pull/28","diff_url":"https://github.com/elm-lang/virtual-dom/pull/28.diff","patch_url":"https://github.com/elm-lang/virtual-dom/pull/28.patch"},"body":"Hello there,\r\n\r\nFirst I want to thank all the maintainers and collaborators of Elm, this is an amazing project which I believe could get really far in terms of adoption.\r\n\r\n### Abstract\r\n\r\nWe want to be able to use Elm in our company [Unbounce](https://unbounce.com), a digital platform that helps marketer agencies automate and integrate all the Marketing needs for their clients. We currently have lots of legacy Front-End code and existing practices around what is a lower common denominator.\r\n\r\nIn theory, Elm can be adapted quite naturally to our infrastructure. There has been a lot of workshops and a [Meetup](http://www.meetup.com/Vancouver-Haskell-Unmeetup/events/231003378/) around Elm internally and externally, the feedback has been really positive, but we are having some small limitations.\r\n\r\nAs part of our inter-team agreements, React _must_ be the view layer of choice when building new UIs, this is because we have a shared library of dumb components with embedded branding in them. This makes it the lower common denominator and something that must be supported if we plan to use Elm. The idea is to create native wrappers around this (well tested) dumb components, and be able to implement Elm views that use this components. We understand this is not the recommended way to do Elm, but sadly, at this point in time, is a tough sale to say every existing and future team inside our company must use Elm for their Front-End development needs.\r\n\r\nWe have been following @evancz [work](https://github.com/evancz/react-elm-components) around allowing Elm components to be rendered inside React components where Elm is at the bottom of the component tree, but we want to have the ability to do the opposite of this, have React at the bottom.\r\n\r\nWe have been doing some work in a library called [elm-react](https://github.com/unbounce/elm-react), where we create a custom `Html` constructor (the same approach used in the [graphics](https://github.com/evancz/elm-graphics) library). We have been able to render static views using a similar API like the one in `elm-lang/html`, but we don't have access to the event bus to emit the messages from there.\r\n\r\nWith this change, we would be able to accomplish this.\r\n\r\n### Alternatives\r\n\r\nOne alternative we did consider, instead of the main solution suggested in this PR, is to have a different `renderer` function on the `Html.program` call, we decided that was not the way to go because that meant we would have different interpretations of the existing `elm-lang/html`, and the mapping with React wouldn't be exactly one to one (really close though).\r\n\r\n### Final remarks\r\n\r\nAgain this is still a work in progress, but is one that we want to make work in order to push stuff to production with Elm.\r\n\r\nThanks for your time."},"comment":{"url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/comments/232938183","html_url":"https://github.com/elm-lang/virtual-dom/pull/28#issuecomment-232938183","issue_url":"https://api.github.com/repos/elm-lang/virtual-dom/issues/28","id":232938183,"user":{"login":"roman","id":7335,"avatar_url":"https://avatars.githubusercontent.com/u/7335?v=3","gravatar_id":"","url":"https://api.github.com/users/roman","html_url":"https://github.com/roman","followers_url":"https://api.github.com/users/roman/followers","following_url":"https://api.github.com/users/roman/following{/other_user}","gists_url":"https://api.github.com/users/roman/gists{/gist_id}","starred_url":"https://api.github.com/users/roman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roman/subscriptions","organizations_url":"https://api.github.com/users/roman/orgs","repos_url":"https://api.github.com/users/roman/repos","events_url":"https://api.github.com/users/roman/events{/privacy}","received_events_url":"https://api.github.com/users/roman/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T12:24:48Z","updated_at":"2016-07-15T12:24:48Z","body":"> Do you want to embed React components in Elm?\r\n\r\nYes\r\n\r\n> Why? I do not get this. What does it matter how the nodes are rendered?\r\n\r\nI think I've mentioned already the rationale. I'm going to try my best and condense the _why_ in a few bullet points:\r\n\r\n* We at Unbounce have decided React to be the common view layer for all teams that do Front-End (currently 6 of them)\r\n* Given this, _dumb_ re-usable components shared across teams are going to be React (This components have branding embedded in them, and are used by our UX/Designers to communicate)\r\n* Replicating this shared components in Elm's `virtual-dom` is a _no-go_, because of the risk of inconsistency\r\n* Out of the 6 teams inside the company, 2 are considering Elm, 1 has studied it and decided to move on and experiment now with GHCJS + Flux + React, the remaining teams are not convinced/interested _yet_\r\n* We strongly believe React has a lot to offer:\r\n  * Great Community\r\n  * Great Documentation\r\n  * Developer Tools\r\n* Same way, some of us strongly believe Elm has _much_ to offer, is not unreasonable for us to try to use both technologies given our current situation.\r\n\r\nEvan, I know you are a really busy person, so I want you to know I'm really thankful for you taking the time to read this and baring with me.\r\n\r\nCheers."}}
{"actor":{"display_login":"roman"}}