0.7.10-alpha.0 • Published 1 year ago

@gaopeng123/hooks.use-visibility v0.7.10-alpha.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

use-visibility

TODO: 返回页面的隐藏和唤醒状态

在线demo

Usage

import React from 'react';
import { useVisibility } from "@gaopeng123/hooks.useVisibility";

type TestUseVisibilityProps = {};
const TestUseVisibility: React.FC<TestUseVisibilityProps> = (props) => {
    const visibility = useVisibility({
        wait: 500,
        onVisibilitychange: (v) => {
            console.log(visibility, v);
        }
    });
    return (
        <div style={{backgroundColor: '#97fa04', width: '100%', height: '100%'}}>
            <h3>useVisibility</h3>
            visibility: {
            visibility
        }
        </div>
    )
};

export default TestUseVisibility;
0.7.10-alpha.0

1 year ago

0.7.8

1 year ago

0.7.6

2 years ago

0.7.2

2 years ago

0.7.1

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.0

3 years ago