Skip to content

Instantly share code, notes, and snippets.

@gregturn
Created September 1, 2015 18:00
Show Gist options
  • Select an option

  • Save gregturn/686d3c1e5e3f3bb317d5 to your computer and use it in GitHub Desktop.

Select an option

Save gregturn/686d3c1e5e3f3bb317d5 to your computer and use it in GitHub Desktop.
Chunk I want to background
componentDidMount: function () {
this.loadItemsFromServer();
this.loadGalleriesFromServer();
// I want to background this --v
stompClient.register([
{route: '/topic/backend.newItem', callback: this.addItemToUnlinkedList},
{route: '/topic/backend.deleteItem', callback: this.removeItemFromUnlinkedList},
{route: '/topic/backend.removeItemFromGallery-item', callback: this.addItemToUnlinkedList},
{route: '/topic/backend.removeItemFromGallery-gallery', callback: this.updateGallery},
{route: '/topic/backend.addItemToGallery-item', callback: this.removeItemFromUnlinkedList},
{route: '/topic/backend.addItemToGallery-gallery', callback: this.updateGallery}
]);
// ------------------------------^
},
@gregturn

gregturn commented Sep 1, 2015

Copy link
Copy Markdown
Author

Perfect! That should speed up rendering the UI and let websocket registration roll out when it rolls out.

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