# @noobs9090/use-prevent-leave

> usePreventLeave 훅은 사용자가 실수로 웹 페이지를 벗어나는 것을 방지하는 데 사용됩니다. 이 훅은 beforeunload 이벤트를 활용하여 페이지를 벗어나기 전 사용자에게 경고 메시지를 표시할 수 있게 해줍니다.

Latest version **1.0.0** (published 2023-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @noobs9090/use-prevent-leave
pnpm add @noobs9090/use-prevent-leave
yarn add @noobs9090/use-prevent-leave
bun add @noobs9090/use-prevent-leave
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-12-07 |
| First published | 2023-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tony |
| Maintainers | tony9090 |
| Keywords | react, hooks, prevent, leave |

## Links

- npm: https://www.npmjs.com/package/@noobs9090/use-prevent-leave
- Repository: https://github.com/qkrdkwl9090/noobs9090
- Homepage: https://github.com/qkrdkwl9090/noobs9090#readme
- Issues: https://github.com/qkrdkwl9090/noobs9090/issues
- npm.io page: https://npm.io/package/@noobs9090/use-prevent-leave

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-12-07

## README

# @noobs/use-prevent-leave

usePreventLeave 훅은 사용자가 실수로 웹 페이지를 벗어나는 것을 방지하는 데 사용됩니다. 이 훅은 beforeunload 이벤트를 활용하여 페이지를 벗어나기 전 사용자에게 경고 메시지를 표시할 수 있게 해줍니다.

## Installation:

yarn

```
yarn add @noobs/use-prevent-leave
```

npm

```
npm i @noobs/use-prevent-leave
```

## Usage:

```js
const InputComponent = () => {
  const maxLen = (value) => value.length <= 10;
  const name = useInput("initialValue", maxLen);

  return (
    <div>
      <input placeholder="Name" {...name} />
    </div>
  );
};
```

---
_Source: https://npm.io/package/@noobs9090/use-prevent-leave · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
