rp

react-powerplug

🔌 Renderless Containers [Unmaintained]

Showing:

Popularity

Downloads/wk

16.1K

GitHub Stars

2.7K

Maintenance

Last Commit

2yrs ago

Contributors

28

Package

Dependencies

1

Size (min+gzip)

2.3KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

Yes?

Categories

Readme

React PowerPlug

npm stars tweet


> **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

  • 👌 Dependency free
  • 🔌 Plug and play
  • 🔮 Tree shaking friendly (ESM, no side effects)
  • 📦 Super tiny (~3kb)
  • 📚 Well documented
  • 🍻 Bunch of awesome utilities
See quick examples
import { State, Toggle } from 'react-powerplug'
import { Pagination, Tabs, Checkbox } from './MyDumbComponents'

<State initial={{ offset: 0, limit: 10, totalCount: 200 }}>
  {({ state, setState }) => (
    <Pagination {...state} onChange={(offset) => setState({ offset })} />
  )}
</State>

<Toggle initial={true}>
  {({ on, toggle }) => (
    <Checkbox checked={on} onChange={toggle} />
  )}
</Toggle>

// You can also use a `render` prop instead

<Toggle
  initial={false}
  render={({ on, toggle }) => (
    <Checkbox checked={on} onChange={toggle} />
  )}
/>

Guide & Documentation

http://rena.to/react-powerplug/


Watch 'Rapid Prototyping with React PowerPlug' by Andrew Del Prete on egghead.io


Install

Node Module

yarn add react-powerplug
npm i react-powerplug

UMD

<script src="https://unpkg.com/react-powerplug/dist/react-powerplug.min.js"></script>

exposed as ReactPowerPlug

Contributors

Thanks goes to these wonderful people (emoji key):


Renato Ribeiro

💻 🎨 📖 ⚠️

Bogdan Chadkin

💻 📖 ⚠️ 🚇

Travis Arnold

💻 📖 🐛

Max Graey

💻

Mateusz Burzyński

🐛

Andy Edwards

💻

Andrea Vanini

🐛

Ivan Starkov

🐛

Sean Roberts

📖

Braden Kelley

🐛

This project follows the 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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Voratham.SiriThailand, Samut Prakarn26 Ratings0 Reviews
I just be coder and crazy learner
3 months ago
Andrey ErmakovSaint Petersburg7 Ratings0 Reviews
Javascript native speaker
1 year ago

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial