1.0.9 • Published 2 years ago

@ronin-react/zhooks v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 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

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago