https://github.com/renatorib/react-powerplug
:electric_plug: Renderless Containers
https://github.com/renatorib/react-powerplug
dumb dumb-components javascript react react-component render-props renderless renderless-components state state-container
Last synced: 5 days ago
JSON representation
:electric_plug: Renderless Containers
- Host: GitHub
- URL: https://github.com/renatorib/react-powerplug
- Owner: renatorib
- License: mit
- Created: 2017-09-11T03:04:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-25T23:06:21.000Z (about 2 years ago)
- Last Synced: 2025-04-10T18:17:54.868Z (5 days ago)
- Topics: dumb, dumb-components, javascript, react, react-component, render-props, renderless, renderless-components, state, state-container
- Language: JavaScript
- Homepage: https://renatorib.github.io/react-powerplug
- Size: 1.3 MB
- Stars: 2,680
- Watchers: 26
- Forks: 100
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-react-render-props - react-powerplug
- awesome-list - react-powerplug
- awesome-react-render-props - react-powerplug
README
![]()
> **React PowerPlug is a set of pluggable renderless components and helpers** that provides different types of state and logic utilities that you can use with your dumb components. It creates state and passes down the logic to the children, so you can handle your data. Read about the [Render Props](https://reactjs.org/docs/render-props.html) pattern.## Highlights
- :ok_hand: Dependency free
- :electric_plug: Plug and play
- :crystal_ball: Tree shaking friendly (ESM, no side effects)
- :package: Super tiny (~3kb)
- :books: Well documented
- :beers: Bunch of awesome utilitiesSee quick examples
```jsx
import { State, Toggle } from 'react-powerplug'
import { Pagination, Tabs, Checkbox } from './MyDumbComponents'{({ state, setState }) => (
setState({ offset })} />
)}{({ on, toggle }) => (
)}// You can also use a `render` prop instead
(
)}
/>
```## Guide & Documentation
http://rena.to/react-powerplug/
---
---
# Install
### Node Module
```
yarn add react-powerplug
``````
npm i react-powerplug
```### UMD
```html
```
exposed as `ReactPowerPlug`
# Contributors
Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):
| [
Renato Ribeiro](http://twitter.com/renatorib_)
[💻](https://github.com/renatorib/react-powerplug/commits?author=renatorib "Code") [🎨](#design-renatorib "Design") [📖](https://github.com/renatorib/react-powerplug/commits?author=renatorib "Documentation") [⚠️](https://github.com/renatorib/react-powerplug/commits?author=renatorib "Tests") | [
Bogdan Chadkin](https://github.com/TrySound)
[💻](https://github.com/renatorib/react-powerplug/commits?author=TrySound "Code") [📖](https://github.com/renatorib/react-powerplug/commits?author=TrySound "Documentation") [⚠️](https://github.com/renatorib/react-powerplug/commits?author=TrySound "Tests") [🚇](#infra-TrySound "Infrastructure (Hosting, Build-Tools, etc)") | [
Travis Arnold](http://travisrayarnold.com)
[💻](https://github.com/renatorib/react-powerplug/commits?author=souporserious "Code") [📖](https://github.com/renatorib/react-powerplug/commits?author=souporserious "Documentation") [🐛](https://github.com/renatorib/react-powerplug/issues?q=author%3Asouporserious "Bug reports") | [
Max Graey](https://github.com/MaxGraey)
[💻](https://github.com/renatorib/react-powerplug/commits?author=MaxGraey "Code") | [
Mateusz Burzyński](https://github.com/Andarist)
[🐛](https://github.com/renatorib/react-powerplug/issues?q=author%3AAndarist "Bug reports") | [
Andy Edwards](http://helloandy.xyz)
[💻](https://github.com/renatorib/react-powerplug/commits?author=jedwards1211 "Code") | [
Andrea Vanini](http://uidu.org)
[🐛](https://github.com/renatorib/react-powerplug/issues?q=author%3Aapuntovanini "Bug reports") |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| [
Ivan Starkov](https://twitter.com/icelabaratory)
[🐛](https://github.com/renatorib/react-powerplug/issues?q=author%3Aistarkov "Bug reports") | [
Sean Roberts](http://factore.ca)
[📖](https://github.com/renatorib/react-powerplug/commits?author=SeanRoberts "Documentation") | [
Braden Kelley](https://github.com/redbmk)
[🐛](https://github.com/renatorib/react-powerplug/issues?q=author%3Aredbmk "Bug reports") |This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
# Contribute
You can help improving this project sending PRs and helping with issues.
Also you can ping me at [Twitter](http://twitter.com/renatorib_)