1- import React , { Component } from 'react'
1+ import React , { Component } from 'react' ;
22
3- import 'react-toggle/style.css'
3+ import 'react-toggle/style.css' ;
44
5- import BottomScrollListener from 'react-bottom-scroll-listener'
5+ import { BottomScrollListener } from 'react-bottom-scroll-listener' ;
66
77class ComponentExample extends Component {
88 handleOnDocumentBottom = ( ) => {
9- console . log ( 'I am at bottom! ' + Math . round ( performance . now ( ) ) )
9+ console . log ( 'I am at bottom! ' + Math . round ( performance . now ( ) ) ) ;
1010
1111 if ( this . props . alertOnBottom ) {
12- alert ( 'Bottom hit! Too slow? Reduce "debounce" value in props' )
12+ alert ( 'Bottom hit! Too slow? Reduce "debounce" value in props' ) ;
1313 }
14- }
14+ } ;
1515
1616 handleContainerOnBottom = ( ) => {
17- console . log ( 'I am at bottom in optional container! ' + Math . round ( performance . now ( ) ) )
17+ console . log ( 'I am at bottom in optional container! ' + Math . round ( performance . now ( ) ) ) ;
1818
1919 if ( this . props . alertOnBottom ) {
20- alert ( 'Bottom of this container hit! Too slow? Reduce "debounce" value in props' )
20+ alert ( 'Bottom of this container hit! Too slow? Reduce "debounce" value in props' ) ;
2121 }
22- }
22+ } ;
2323
2424 render ( ) {
2525 return (
@@ -39,7 +39,7 @@ class ComponentExample extends Component {
3939 { /* If you want to listen for the bottom of a specific container you need to forward
4040 a scrollRef as a ref to your container */ }
4141 < BottomScrollListener onBottom = { this . handleContainerOnBottom } >
42- { scrollRef => (
42+ { ( scrollRef ) => (
4343 < div ref = { scrollRef } className = "inner-scroll-example" >
4444 < h4 > Callback when this container hits bottom</ h4 >
4545 < div > Scroll down! ▼▼▼</ div >
@@ -50,8 +50,8 @@ class ComponentExample extends Component {
5050 ) }
5151 </ BottomScrollListener >
5252 </ div >
53- )
53+ ) ;
5454 }
5555}
5656
57- export default ComponentExample
57+ export default ComponentExample ;
0 commit comments