{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/59","repository_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js","labels_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/59/comments","events_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/59/events","html_url":"https://github.com/aws/aws-iot-device-sdk-js/issues/59","id":154866811,"number":59,"title":"Question: React Native","user":{"login":"rkelly92","id":8119487,"avatar_url":"https://avatars.githubusercontent.com/u/8119487?v=3","gravatar_id":"","url":"https://api.github.com/users/rkelly92","html_url":"https://github.com/rkelly92","followers_url":"https://api.github.com/users/rkelly92/followers","following_url":"https://api.github.com/users/rkelly92/following{/other_user}","gists_url":"https://api.github.com/users/rkelly92/gists{/gist_id}","starred_url":"https://api.github.com/users/rkelly92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkelly92/subscriptions","organizations_url":"https://api.github.com/users/rkelly92/orgs","repos_url":"https://api.github.com/users/rkelly92/repos","events_url":"https://api.github.com/users/rkelly92/events{/privacy}","received_events_url":"https://api.github.com/users/rkelly92/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-05-14T17:48:22Z","updated_at":"2016-08-21T20:30:45Z","closed_at":"2016-05-14T19:59:41Z","body":"Hello 😀 . I'd like to know if there's any advise regarding using this with React Native. I'm aware of certain node core dependencies and that a browser version would be more suitable. I got the Paho browser client working and was able to successfully communicate with the AWS MQTT broker but using that approach would mean implementing by myself certain functionality which is already present in the AWS IoT JS SDK. So I tried both the browserize script (with a slight modification to generate a UMD bundle) and using webpack with the options seen in https://github.com/aws/aws-iot-device-sdk-js/pull/58 but the code I ran did nothing (no errors popped up, which is good, but got no successful output either). I haven't done front end development for a while so I really don't know what I'm doing in the bundling process. Any pointers would be appreciated."},"comment":{"url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/comments/241280126","html_url":"https://github.com/aws/aws-iot-device-sdk-js/issues/59#issuecomment-241280126","issue_url":"https://api.github.com/repos/aws/aws-iot-device-sdk-js/issues/59","id":241280126,"user":{"login":"rkelly92","id":8119487,"avatar_url":"https://avatars.githubusercontent.com/u/8119487?v=3","gravatar_id":"","url":"https://api.github.com/users/rkelly92","html_url":"https://github.com/rkelly92","followers_url":"https://api.github.com/users/rkelly92/followers","following_url":"https://api.github.com/users/rkelly92/following{/other_user}","gists_url":"https://api.github.com/users/rkelly92/gists{/gist_id}","starred_url":"https://api.github.com/users/rkelly92/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkelly92/subscriptions","organizations_url":"https://api.github.com/users/rkelly92/orgs","repos_url":"https://api.github.com/users/rkelly92/repos","events_url":"https://api.github.com/users/rkelly92/events{/privacy}","received_events_url":"https://api.github.com/users/rkelly92/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T20:30:45Z","updated_at":"2016-08-21T20:30:45Z","body":"Hey @tslater. Sorry, totally missed your question. Basically yeah. It has been a while since I implemented my project so don't remember all the details but I had started working with react native 0.25 and websocket support had limitations. 0.26 was fine but until that got released I used the code from that PR. And the line I reference in the mqttjs repo is now wrong (it changed) but the issue was that due to `this.stream.on('error', nop)` no error was showing up, so replacing nop with a basic console.log led me to the solution (digging through react native issues and PRs).\r\nApart from that, I couldn't use npm 3. I ended up using the browserize script from this repo with the browserify standalone option and added the bundle to version control. For some reason, with nested dependencies (the way npm 2 resolves them) that approach worked fine but with the flat resolution (of npm 3) I got the node core modules problem again. I have little to no experience with browserify and webpack so simply kept using what I was able to get working. Haven't revisited the problem either.  "}}
{"actor":{"display_login":"rkelly92"}}