congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo For Javascript
Base.publish
Code IndexAdd Tabnine to your IDE (free)

How to use
publish
function
in
Base

Best JavaScript code snippets using pubsub-js.Base.publish(Showing top 11 results out of 315)

origin: john-doherty/raspberry-pi-mjpeg-server

// hook file change events and send the modified image to the browser
watcher.on('change', function(file) {

  //console.log('change >>> ', file);

  fs.readFile(file, function(err, imageData) {
    if (!err) {
      PubSub.publish('MJPEG', imageData);
    }
    else {
      console.log(err);
    }
  });
});
origin: eMarek/React-examples

React.createClass({
  handleClick: function() {
    PubSub.publish('PRODUCT_CLICKED', this.props.name);
  },
  render: function() {
    return (
      <div onClick={this.handleClick}>{this.props.name}</div>
    );
  }
})
origin: eMarek/React-examples

handleLogout: function(e) {
  e.preventDefault;
  PubSub.publish('SESSION_CARE', false);
},
handleProfile: function(e) {
  e.preventDefault;
  PubSub.publish('POPUP_OPEN', {
    type: "custom",
    template: "ChangePassword"
origin: eMarek/React-examples

},
handleBack: function() {
  this.token_BACKBUTTON_CLICK = PubSub.publish('BACKBUTTON_CLICK');
  this.setState({
    gathering: false,
origin: eMarek/React-examples

      });
      if (rsp.status === "ok") {
        PubSub.publish('GATHERINGS_REFRESH');
        _.delay(function() {
          PubSub.publish('POPUP_CLOSE', 'GatheringCreate');
        }, 500);
},
handleCancel: function(e) {
  PubSub.publish('POPUP_CLOSE', 'GatheringCreate');
},
render: function() {        
origin: eMarek/React-examples

});
if (rsp.status === "error" && rsp.error === "doublecheck") {
  PubSub.publish('POPUP_OPEN', {
    type: "custom",
    template: "RegistrationDoubleCheck",
origin: eMarek/React-examples

handleGatheringStart: function(e) {
  e.preventDefault;
  PubSub.publish('POPUP_OPEN', {
    type: "custom",
    template: "GatheringCreate"
},
handleGatheringOpen: function(gathering) {
  PubSub.publish('GATHERING_SELECT', gathering);
},
renderGathering: function(gathering) {
origin: eMarek/React-examples

if (rsp.status === "ok") {
  _.delay(function(session) {
    PubSub.publish('SESSION_CARE', session);
  }.bind(this), 500, rsp.session);
origin: eMarek/React-examples

        });
        _.delay(function() {
          PubSub.publish('POPUP_CLOSE', 'RegistationDoubleCheck');
        }.bind(this), 3000);
      } else {
},
handleCancel: function(e) {
  PubSub.publish('POPUP_CLOSE', 'RegistationDoubleCheck');
},
handleClose: function(e) {
  PubSub.publish('POPUP_CLOSE', 'RegistationDoubleCheck');
},
renderButtons: function() {
origin: eMarek/React-examples

      if (rsp.status === "ok") {
        _.delay(function() {
          PubSub.publish('POPUP_CLOSE', 'ChangePassword');
        }, 1000);
},
handleCancel: function(e) {
  PubSub.publish('POPUP_CLOSE', 'ChangePassword');
},
render: function() {        
origin: eMarek/React-examples

        });
        _.delay(function() {
          PubSub.publish('POPUP_CLOSE', 'FillTheName');
        }, 3500);
      } else {
    message: "You will be logged out in few seconds."
  });
  PubSub.publish('SESSION_CARE', false);
  _.delay(function() {
    PubSub.publish('POPUP_CLOSE', 'FillTheName');
  }, 1500);
},
pubsub-js(npm)Basepublish

Most used pubsub-js functions

  • Base.publish
  • Base.subscribe
  • Base.unsubscribe

Popular in JavaScript

  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • minimist
    parse argument options
  • fs
  • moment
    Parse, validate, manipulate, and display dates
  • express
    Fast, unopinionated, minimalist web framework
  • rimraf
    A deep deletion module for node (like `rm -rf`)
  • chalk
    Terminal string styling done right
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • body-parser
    Node.js body parsing middleware
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now