jkomyno / react-native-user-inactivity

Simple component that alerts when the user is inactive (i.e. when the App surface hasn't been touched for X ms)
MIT License
200 stars 56 forks source link

implement componentDidUpdate for prop change #21

Closed mdaronco closed 5 years ago

mdaronco commented 5 years ago

I've added an implementation of componentDidUpdate so that the timer is cleared and reset with a new timeout value if the prop changes. I came across this use case in my own application.