• Stars
    star
    2,682
  • Rank 17,027 (Top 0.4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”Œ Renderless Containers

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

More Repositories

1

react-sizes

โ†”๏ธ Hoc to easily map window sizes to props.
JavaScript
724
star
2

github-blog

๐Ÿ™ Turn your github issues into a CMS for your blog.
TypeScript
402
star
3

bjson

ABANDONED! Bind Json: Reactive way to read/write json files.
JavaScript
72
star
4

janimate

jQuery Animate: jQuery animations with animate.css
JavaScript
69
star
5

react-bps

๐Ÿ”ฑ Create breakpoints to your component props
JavaScript
64
star
6

styn

๐Ÿ’Ž A small, zero-dependency, extensible, object to css generator
TypeScript
41
star
7

styleshape

๐Ÿ”ถ Because inline style can also be cool! [180 bytes only!]
JavaScript
41
star
8

lo-jsondb

Small database based on local .json files
JavaScript
40
star
9

next-jph

๐Ÿ“ JsonPlaceholder sample app made with Next.js
JavaScript
34
star
10

cartola-api

Implementaรงรฃo da API do CartolaFC em PHP
PHP
22
star
11

tibia-outfitter

New Tibia Outfitter.php
PHP
19
star
12

otinfo

Open Tibia Server Info Parser (otinfo). Catch information like players online, owner, motd, map weight, monsters, npcs, etc. passing IP and PORT.
PHP
18
star
13

otcts

Open Tibia Client in TS. Still WIP.
TypeScript
17
star
14

slaq

๐Ÿงฑ A lib to build Slack Apps, modular.
JavaScript
16
star
15

tibia-node-crawler

Tibia Crawler in nodejs
JavaScript
16
star
16

renatorib.github.io

My personal website
JavaScript
6
star
17

caixinha

Simple bundler for study
TypeScript
6
star
18

geo

TypeScript
6
star
19

covid19databr

For studying purposes.
JavaScript
4
star
20

slack-ui

Build slack Block Kit ui with JSX
3
star
21

curriculum-vitae

Renato Ribeiro, Frontend Engineer.
CSS
3
star
22

dot-notation

Node package to help you working with dot notation in objects
JavaScript
3
star
23

posts

rena.to posts source repo
2
star
24

caixa

TypeScript
2
star
25

cvb

Covid Vaccine Br
TypeScript
2
star
26

typed-ms

Typed MS
TypeScript
2
star
27

publ-blog-posts

1
star
28

2048.js

fp 2048 lib
JavaScript
1
star
29

2048-term

Play 2048 game in terminal
JavaScript
1
star
30

spinein

Spine like a shell spinner
JavaScript
1
star
31

tibia-tasks

Build some automated tasks in tibia.com =)
HTML
1
star
32

renatorib

1
star
33

github-blog-tests

1
star
34

cra-material-ui

JavaScript
1
star
35

souls

Souls is a collection of CSS Animations that can also be handled by JavaScript.
1
star