# react-prop-toggle

> A safe, declarative way to influence the styles and attributes of nodes outside your app's tree.

Latest version **1.0.2** (published 2018-04-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-prop-toggle
pnpm add react-prop-toggle
yarn add react-prop-toggle
bun add react-prop-toggle
```

## 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.2 |
| Published | 2018-04-28 |
| First published | 2018-04-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 209.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jossmac |
| Keywords | react, prop, property, attribute, style, toggle |

## Links

- npm: https://www.npmjs.com/package/react-prop-toggle
- Homepage: https://github.com/jossmac/react-prop-toggle
- Issues: https://github.com/jossmac/react-prop-toggle/issues
- npm.io page: https://npm.io/package/react-prop-toggle

## 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.2 (latest) — 2018-04-28
- 1.0.1 — 2018-04-28
- 1.0.0 — 2018-04-28

## README

# React Prop Toggle

A safe, declarative way to influence the styles and attributes of nodes outside
your app's tree.

By storing the initial values of the target node when mounting
`react-prop-toggle` is able to safely return styles and attributes when
unmounted.

```js
<PropToggle
  isActive={this.state.someCondition}
  attributes={{ 'data-variant': 'true' }}
  styles={{ background: 'red' }}
/>
```

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