You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The propMapper of mapPropsOnScroll() currently accept two args
(nextScroll, prevScroll): Object => {}
IMHO prevScroll might be not used in some cases, so we should let consumers to save it by themselves if they need it. It is easily to achieve by using recompose/mapProps or rx-recompose/mapPropsStream and is already implemented in React componentWillReceiveProps().
If mapPropsOnScroll only provides nextScroll, it would be no difference to compose(withWindowScroll, mapProps) where withWindowScroll simply append scroll to props.
In addition, withWindowScroll would be more consistent with other HOCs in react-dom-utils.
The propMapper of
mapPropsOnScroll()
currently accept two argsIMHO
prevScroll
might be not used in some cases, so we should let consumers to save it by themselves if they need it. It is easily to achieve by usingrecompose/mapProps
orrx-recompose/mapPropsStream
and is already implemented in ReactcomponentWillReceiveProps()
.If
mapPropsOnScroll
only providesnextScroll
, it would be no difference tocompose(withWindowScroll, mapProps)
wherewithWindowScroll
simply appendscroll
toprops
.In addition,
withWindowScroll
would be more consistent with other HOCs inreact-dom-utils
.@evenchange4 what do you think?
The text was updated successfully, but these errors were encountered: