diff --git a/Readme.md b/Readme.md index 5751973..5f5098f 100644 --- a/Readme.md +++ b/Readme.md @@ -15,6 +15,31 @@ http://realscout.github.io/redux-infinite-scroll/ npm install redux-infinite-scroll --save ``` +## Importing Via AMD/CommonJS + +##### ES6 format +```javascript +import ReduxInfiniteScroll from 'redux-infinite-scroll'; +``` +##### ES5 format +```javascript +var ReduxInfiniteScroll = require('redux-infinite-scroll'); +``` + +## Importing Via Script Tag +If you decide to use either one of the distribution files found in `/dist`, then you can access the `ReduxInfiniteScroll` via a global variable. + +##### ES6 format +```javascript +ReduxInfiniteScroll +``` +##### ES5 format +```javascript +ReduxInfiniteScroll.default; +``` +The difference is due to the `ReduxInfiniteScroll` being an ES6 module and therefore having a different export syntax than ES5. + + ## Usage In order to use it in your React app, simply import it and follow the example below. The component expects to receive diff --git a/dev/index.html b/dev/index.html new file mode 100644 index 0000000..78d98a1 --- /dev/null +++ b/dev/index.html @@ -0,0 +1,14 @@ +
+ + + + + + + + + + + diff --git a/dist/redux-infinite-scroll.js b/dist/redux-infinite-scroll.js index 37fd139..6c5598e 100644 --- a/dist/redux-infinite-scroll.js +++ b/dist/redux-infinite-scroll.js @@ -1,22 +1,292 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){n(159),e.exports=n(158)},function(e,t,n){var r=n(10),o=n(30),i=n(26),a=n(21),u=n(24),s="prototype",c=function(e,t,n){var l,p,d,f,h=e&c.F,v=e&c.G,m=e&c.S,g=e&c.P,y=e&c.B,E=v?r:m?r[t]||(r[t]={}):(r[t]||{})[s],N=v?o:o[t]||(o[t]={}),_=N[s]||(N[s]={});v&&(n=t);for(l in n)p=!h&&E&&l in E,d=(p?E:n)[l],f=y&&p?u(d,r):g&&"function"==typeof d?u(Function.call,d):d,E&&!p&&a(E,l,d),N[l]!=d&&i(N,l,f),g&&_[l]!=d&&(_[l]=d)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,e.exports=c},function(e,t){function n(){c=!1,a.length?s=a.concat(s):l=-1,s.length&&r()}function r(){if(!c){var e=setTimeout(n);c=!0;for(var t=s.length;t;){for(a=s,s=[];++l