프로젝트
GitHub에서 보기
renatorib/react-powerplug
소개
:electric_plug: 렌더링하지 않는 컨테이너
시스템 및 인프라What you can do
- :ok_hand: Dependency free
- :electric_plug: Plug and play
- :crystal_ball: Tree shaking friendly (ESM, no side effects)
- :package: Super tiny (~3kb)
측정된 스타 증가
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +1
- in 1 month
- 0
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalReact 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 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 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/
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
관련 프로젝트 살펴보기
불러오는 중…