0.7.10-alpha.0 • Published 1 year ago

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

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

useClock

时钟器 在线demo

参数

type ClockDate = {
    ymd: string, // 年月日
    hms: string, // 时分秒
    week: string; // 周几
}

const {ymd, hms, week} = useClock();

Usage

import React from 'react';
import {useClock, ClockDate } form "@gaopeng123/hooks.use-clock"; // @gaopeng123/hooks

type TestUseClockProps = {};
const TestUseClock: React.FC<TestUseClockProps> = (props) => {
    const clock: ClockDate = useClock();
    return (
        <React.Fragment>
            <h3>useClock</h3>
            {
                `${clock.ymd} ${clock.hms} ${clock.week}`
            }
        </React.Fragment>
    )
};

export default TestUseClock;
0.7.9

1 year ago

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.0

3 years ago

0.4.2

3 years ago

0.3.0

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago