react-towelie

0.1.1 • Public • Published

react towelie

because react-towel was taken, and you always need your towel, and towelie is your towel

Use useState and useEffect without having to learn them?

great, how's it work?

./src/App.js

import React from 'react';
import towelie from 'react-towelie';

export default towelie(({ count, setCount })=> (
  <div onClick={()=> setCount(count+1)}>{count}</div>
), {
  count: 0
}, {}, [
  ({ count }) => count > 10 ? ({ count: 0 }) : null
]);

render

state

network

effects

This project was bootstrapped with Create React App.

Readme

Keywords

none

Package Sidebar

Install

npm i react-towelie

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

452 kB

Total Files

14

Last publish

Collaborators

  • nikfrank