Skip to content

Doesn't connect when being used in react native #2

Open

Description

@isaacagaba

I have followed the instructions, fortunately, the app doesn't crash however anything happens.Here is my code is written in react native.
`
import wamp from 'wamp.js';
var connection = new wamp.Connection({url: 'http://localhost:3009', realm: 'realm1'});
connection.onopen = function (session) {

      // 1) subscribe to a topic
      function onevent(args) {
          console.log("Event:", args[0]);
      }
      session.subscribe('onNewData', onevent);
  };

connection.open();
`

Activity

  1. webee commented on Apr 6, 2017

    @webee
    Owner

    @Akaiz I simplified the implementation, only support WebSocket, so your url must be a ws url. furthermore, you can watch your wamp server log to see what happened when open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions