open-index/open-npm huggingface dataset:
npm package: @ronin-react/react-keep-alive
Description: ### install
Author: https://github.com/Zhengy1995
Latest version: 1.0.10

## Usage

### install

```
yarn add @ronin-react/react-keep-alive
```

### import component

```tsx
import {useState} from 'react'
import {KeepScope, KeepAlive} from '@ronin-react/react-keep-alive'

const ids = [Math.random().toString(36).slice(2), Math.random().toString(36).slice(2)]

const MyComponent = () => {
	const [num, setNum] = useState(0)
	return <>
		<button onClick={() => setNum(num === 0 ? 1 : 0)}>
		 click to varify
		</button>
		{num === 0 && <KeepAlive id={ids[0]}>
		  <div>{Math.random()}</div>
		 </KeepAlive>}
		 {num === 1 && <KeepAlive id={ids[1]}>
		  <div>{Math.random()}</div>
		 </KeepAlive>}
		</>
}

const App = () => {
	retutn <KeepScope><MyComponent /></KeepScope>	
}
```

### hook
#### useRefreshModule: (modulename: string) => () => void

```tsx
import {useRefreshModule} from '@ronin-react/react-keep-alive'

const MyComponent = () => {
	const fresh = useRefreshModule('otherModule')
	return <div onClick={fresh}></div>
}
```
npm package: @ronin-react/zhooks
Description: ## useBeforeFirstMount
Latest version: 1.0.9

### List

## useBeforeFirstMount

useage

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

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

    return <></>
}
```

## useAfterFirstMount

useage

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

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

    return <></>
}
```

## useEvent

useage

```tsx
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>
}
```