JSFiddle - React, Tailwind, and code Playground

by theirishpenguin

HTML

<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.7.0/underscore-min.js'></script>
<script src='//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone.js'></script>
<script src='//backbone-paginator.github.io/backbone.paginator/lib/backbone.paginator.js'></script>

JavaScript

var Model = Backbone.Model.extend({});

PaginatedCollection = Backbone.PageableCollection.extend({
    // the URL (or base URL) for the service
    url: 'https://api.github.com/repos/jashkenas/backbone/issues?state=closed',
    model: Model,
    mode: "infinite",
});

var collection = new PaginatedCollection();

// Setup: The reset we wire up here should never get raised
collection.on('reset', function() { console.log('reset called'); });

// Exercise (not respecting silent)
collection.getFirstPage({silent: true});
collection.getNextPage({silent: true});