I want to be able to trigger a function through a callback or whatever, specifically to call an API to load more chat messages… according to https://github.com/twobin/react-lazyload/pull/65 this can be triggered within the component by using componentDidRender, but with current React being functional, this isn't available - but useEffect is not handling this either. In any case I would want to call the API in the parent component so a callback prop (or an event) would be useful. Can't use react-lazyload as it is.
I want to be able to trigger a function through a callback or whatever, specifically to call an API to load more chat messages… according to https://github.com/twobin/react-lazyload/pull/65 this can be triggered within the component by using
componentDidRender
, but with current React being functional, this isn't available - butuseEffect
is not handling this either. In any case I would want to call the API in the parent component so a callback prop (or an event) would be useful. Can't use react-lazyload as it is.