{"action":"created","issue":{"url":"https://api.github.com/repos/paf31/purescript-thermite/issues/67","repository_url":"https://api.github.com/repos/paf31/purescript-thermite","labels_url":"https://api.github.com/repos/paf31/purescript-thermite/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/paf31/purescript-thermite/issues/67/comments","events_url":"https://api.github.com/repos/paf31/purescript-thermite/issues/67/events","html_url":"https://github.com/paf31/purescript-thermite/issues/67","id":165683529,"number":67,"title":"Use of div' in render causes problems with react-native","user":{"login":"doolse","id":2178038,"avatar_url":"https://avatars.githubusercontent.com/u/2178038?v=3","gravatar_id":"","url":"https://api.github.com/users/doolse","html_url":"https://github.com/doolse","followers_url":"https://api.github.com/users/doolse/followers","following_url":"https://api.github.com/users/doolse/following{/other_user}","gists_url":"https://api.github.com/users/doolse/gists{/gist_id}","starred_url":"https://api.github.com/users/doolse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doolse/subscriptions","organizations_url":"https://api.github.com/users/doolse/orgs","repos_url":"https://api.github.com/users/doolse/repos","events_url":"https://api.github.com/users/doolse/events{/privacy}","received_events_url":"https://api.github.com/users/doolse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-14T23:48:55Z","updated_at":"2016-11-23T06:49:03Z","closed_at":null,"body":"Because there is no \"div\" component in react-native you get an error when using thermite.\nI made a workaround which only uses a div if there is more than one element in the array but it would be better to make it customisable. I believe the equivalent in react-native would be to use the \"view\" component. Here is my work around for reference:\n\n``` purescript\nrender :: React.Render props state eff\nrender this = map maybeDiv $\n  spec.render (dispatcher this)\n    <$> React.getProps this\n    <*> React.readState this\n    <*> React.getChildren this\n    where\n      maybeDiv elems = fromMaybe (div' elems) if (length elems == 1) then head elems else Nothing\n```\n"},"comment":{"url":"https://api.github.com/repos/paf31/purescript-thermite/issues/comments/262444399","html_url":"https://github.com/paf31/purescript-thermite/issues/67#issuecomment-262444399","issue_url":"https://api.github.com/repos/paf31/purescript-thermite/issues/67","id":262444399,"user":{"login":"sudhirvkumar","id":84494,"avatar_url":"https://avatars.githubusercontent.com/u/84494?v=3","gravatar_id":"","url":"https://api.github.com/users/sudhirvkumar","html_url":"https://github.com/sudhirvkumar","followers_url":"https://api.github.com/users/sudhirvkumar/followers","following_url":"https://api.github.com/users/sudhirvkumar/following{/other_user}","gists_url":"https://api.github.com/users/sudhirvkumar/gists{/gist_id}","starred_url":"https://api.github.com/users/sudhirvkumar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sudhirvkumar/subscriptions","organizations_url":"https://api.github.com/users/sudhirvkumar/orgs","repos_url":"https://api.github.com/users/sudhirvkumar/repos","events_url":"https://api.github.com/users/sudhirvkumar/events{/privacy}","received_events_url":"https://api.github.com/users/sudhirvkumar/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T06:49:03Z","updated_at":"2016-11-23T06:49:03Z","body":"@pkamenarsky @doolse We are using thermite for react native applications we are still in the development phase and API will have breaking changes.\r\n\r\nYou can check it out in https://github.com/sudhirvkumar/purescript-rnx/tree/thermite.\r\n\r\nThis will be merged with into https://github.com/atomicits/purescript-rnx and released as purescript-rnx package\r\n\r\nWe are working on a client project with this library. We appreciate feedback :)"}}
{"actor":{"display_login":"sudhirvkumar"}}