react-on-screen icon indicating copy to clipboard operation
react-on-screen copied to clipboard

Add onVisible event

Open nharlow89 opened this issue 6 years ago • 3 comments

Another use case I came across is triggering additional logic when the component becomes visible (outside of rendering logic). Would be super convenient to add an event as a prop such as onVisible or onVisibilityChange.

nharlow89 avatar Nov 29 '18 19:11 nharlow89

+1 This would be handy indeed

ost-ing avatar Dec 10 '18 10:12 ost-ing

This would be useful.

Workaround (about to implement it) - Passing down a prop with the function to the component, which can be called onMount (or on render or whatever).

I'll see how I go and post an example here if it works.

HemalR avatar Jan 24 '19 05:01 HemalR

#39

liao-frank avatar Feb 18 '19 17:02 liao-frank