does the react library: react-idle-timer work on mobile browser?

i implemented react-idle-timer as given below in my code

App.js

        const onIdle = () => {
        props.logOut();
    };
    return (
        <div className={styles.app}>
            <Suspense fallback={null}>
                <div className={styles.homeContainer}>
                    <div className={['col-md-12 col-sm-12', styles.dashboardContainer].join(' ')}>
                        <IdleTimer timeout={60 * 1000 * 15} onIdle={onIdle} />
                        <ErrorBoundary>{routes}</ErrorBoundary>
                        <ToastContainer />
                    </div>
                </div>
            </Suspense>
        </div>
    );
}

logOut function:

export const logOut = () => {
    localStorage.clear();
    return {
        type: actionTypes.AUTH_LOGOUT
    };
};

it works just fine on desktop browser but it fails to do so in mobile browser. can anyone suggest the fix for that?