# do-effect

> A really bad idea for setting up dynamic useEffects

Latest version **1.0.0** (published 2023-02-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install do-effect
pnpm add do-effect
yarn add do-effect
bun add do-effect
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-02-25 |
| First published | 2023-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=12.22.0 |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Scrumrot |
| Maintainers | scrumrot |
| Keywords | useEffect, react, hooks, dynamic, typescript, react-hooks |

## Links

- npm: https://www.npmjs.com/package/do-effect
- Repository: https://github.com/Scrumrot/do-effect
- Homepage: https://github.com/Scrumrot/do-effect#readme
- Issues: https://github.com/Scrumrot/do-effect/issues
- npm.io page: https://npm.io/package/do-effect

## 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-02-25

## README

<div align="center">
        <h1>
            do-effect
        </h1>
</div>

### Features

- Don't Do it!
- Run Now!
- Dynamically call useEffects via the virtual dom
### Install

    npm install do-effect


### Quickstart

```tsx
import {useState, useMemo} from 'react';
import { DoEffect } from 'do-effect';

interface AppProps {
  children: React;
  doAThing: () => void;
}

function App({ children, doAThing }: AppProps) {
  const [loading, setLoading] = useState(true);

  return (
    <div>
      {loading && (
        <DoEffect
          effect={() => {
            doAThing();
            setLoading(false);
          }}
        />
      )}
      {children}
    </div>
  );
}
```

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