How to use the pubnub-react function in pubnub-react

To help you get started, we’ve selected a few pubnub-react examples, based on popular ways it is used in public projects.

github namrathasubramanya / reactjs-bidding-dashboard / src / Dashboard.js View on Github external
constructor(props) {
    	super(props);
			this.state = {highest: 0, people: 0};
			//this.last_message = 0;
    	this.pubnub = new PubNubReact({
            publishKey: 'pub-c-172db584-ca6b-4e9c-80a7-4e4d982bcf65',
            subscribeKey: 'sub-c-07e8b65a-78c9-11e8-bf64-d6949d01620d'
        });
    	this.pubnub.init(this);
			// this.state = { highest : 0 };
			console.log({ pubnub: this.pubnub });

    }
github namrathasubramanya / reactjs-bidding-dashboard / src / Art1.js View on Github external
constructor(props) {
    	super(props);
    	this.state = {value: ''};
    	this.pubnub = new PubNubReact({
            publishKey: 'ENTER_YOUR_PUBLISH_KEY',
            subscribeKey: 'ENTER_YOUR_SUBSCRIBE_KEY'
        });
    	this.pubnub.init(this);
    	this.handleChange = this.handleChange.bind(this);
   	 	this.handleSubmit = this.handleSubmit.bind(this);
  	}
github dekk-app / dekk / @dekk / pubnub / src / index.js View on Github external
constructor(props) {
    super(props)
    const {publishKey, subscribeKey} = this.props
    /**
     * Pubnub instance
     * @private
     */
    this.pubnub = new PubNubReact({publishKey, subscribeKey})
    this.pubnub.init(this)
  }
github dekk-app / dekk / src / components / deck / index.js View on Github external
constructor(props) {
    super(props)
    this.state = {
      direction: 0
    }
    if (typeof props.pubnub === 'object' && (LIVE || PRESENT)) {
      this.pubnub = new PubNubReact({
        publishKey: props.pubnub.publishKey,
        subscribeKey: props.pubnub.subscribeKey
      })
      this.pubnub.init(this)
    }
  }

pubnub-react

Publish & Subscribe Real-time Messaging with PubNub

MIT
Latest version published 3 months ago

Package Health Score

81 / 100
Full package analysis

Popular pubnub-react functions

Similar packages