1.0.9 • Published 3 years ago

@ronin-react/zhooks v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

List

useBeforeFirstMount

useage

import {useBeforeFirstMount} from '@ronin-react/zhooks'

const MyComponent = () => {
    useBeforeFirstMount(() = > {
        // do what u want to do
    })

    return <></>
}

useAfterFirstMount

useage

import {useAfterFirstMount} from '@ronin-react/zhooks'

const MyComponent = () => {
    useAfterFirstMount(() = > {
        // do what u want to do
    })

    return <></>
}

useEvent

useage

import {useState} from 'react'
import {useEvent} from '@ronin-react/zhooks'

const MyComponent = () => {
    const [count, setCount] = useState(0)
    const onClick = useEvent(() => {
        setCount(count + 1)
    })

    return <span onClick={onClick}>{count}</span>
}
1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago