An open API service indexing awesome lists of open source software.

https://github.com/jossmac/react-prop-toggle

🕹 Influence nodes outside your app's render tree
https://github.com/jossmac/react-prop-toggle

Last synced: about 1 year ago
JSON representation

🕹 Influence nodes outside your app's render tree

Awesome Lists containing this project

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.

```jsx
import PropToggle, { SimpleToggle } from 'react-prop-toggle';

// Use PropToggle with `isActive` prop

// Or use SimpleToggle for a component that's already conditionally rendered
class Modal extends Component {
render() {
return (




);
}
}
```