# useeffect-factory

> ```js import React, {useEffect} from "react";

Latest version **0.0.13** (published 2021-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install useeffect-factory
pnpm add useeffect-factory
yarn add useeffect-factory
bun add useeffect-factory
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.13 |
| Published | 2021-02-25 |
| First published | 2021-01-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 1.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | sahilrajput03 |

## Links

- npm: https://www.npmjs.com/package/useeffect-factory
- Repository: https://github.com/sahilrajput03/useeffect-factory
- npm.io page: https://npm.io/package/useeffect-factory

## Recent versions

- 0.0.13 (latest) — 2021-02-25
- 0.0.12 — 2021-01-12
- 0.0.10 — 2021-01-12
- 0.0.9 — 2021-01-12
- 0.0.8 — 2021-01-12
- 0.0.7 — 2021-01-12
- 0.0.6 — 2021-01-12
- 0.0.5 — 2021-01-12
- 0.0.4 — 2021-01-12
- 0.0.3 — 2021-01-12

## README

## Source code:

```js
import React, {useEffect} from "react";

export const useEffectAsync = (fn, deps) => {
	useEffect(() => {
		fn();
	}, deps);
};

export const useComponentWillMount = (fn) => {
	let ref = useRef(false);

	useEffect(() => {
		if (!ref.current) {
			fn();
			ref.current = true;
		}
	});
};

export const useComponentWillMount2 = (fn) => {
	useEffect(() => {
		fn();
		/* eslint-disable-next-line */
	}, []);
};
```

---
_Source: https://npm.io/package/useeffect-factory · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
