react-scroll-to-bottom
Advanced tools
Changelog
[1.3.0] - 2019-01-21
react@16.6.0
, react-dom@16.6.0
, and react-scripts@2.1.6
*
: Update algorithm, instead of using componentDidUpdate
, we now use setInterval
to check if the panel is sticky or not, this help to track content update that happen outside of React lifecycle, for example, HTMLImageElement.onload
eventComposer
: scrollTo()
now accepts "100%"
instead of "bottom"
threshold
props because the algorithm is now more robustChangelog
[1.2.0] - 2018-10-28
AutoHideFollowButton
: will now hide when it start animating scroll positionBasicScrollToBottom
: will now pass debounce
and threshold
to Composer
, fix #2Composer
: debounce
prop to control debouncing on onScroll
event, default to 17
FunctionContext
: scrollTo
now support "bottom"
, in addition to a number
, fix #1
FunctionContext
: scrollToStart
function to scroll to the start, depends on mode
StateContext
: animating
returns true
if the scroll position is being animatedStateContext
: atStart
indicates if the scroll position is at the start or not, depend on mode
Context
is now separated into FunctionContext
, InternalContext
and StateContext
for better performance and reduce exposure
FunctionContext
is static and only hold functions for manipulating the panelInternalContext
is static and for internal use (to overcome shortcomings of React.createRef
)StateContext
is dynamic and change when scroll position changeStateContext
will now only update if there are any meaningful changesdisplayName
to contextlerna
bumped from 2.11.0
to 3.4.3