A React hooks library to speed up your components development

栏目: IT技术 · 发布时间: 5年前

内容简介:A collection of beautiful (and hopefully useful) React hooks to speed-up your components and hooks development

A React hooks library to speed up your components development

A collection of beautiful (and hopefully useful) React hooks to speed-up your components and hooks development

:star2: Live playground here :star2:

A React hooks library to speed up your components development

:gb: English | :cn: 简体中文 | :it: Italiano | :es: Español | :ua: Ukrainian | :br: Brazilian Portuguese | :pl: Polski

:bulb: Why?

React custom hooks allow to abstract components' business logic into single reusable functions.

So far, we've found that most of the hooks we've created and therefore shared between our internal projects have quite often a similar gist that involves callback references, events and components' lifecycle.

For this reason we've tried to sum up that gist into beautiful-react-hooks : a collection of ( hopefully ) useful React hooks to possibly help other companies and professionals to speed up their development process.

Furthermore, we created a concise yet concrete API having in mind the code readability, focusing to keep the learning curve as lower as possible so that the it can be used and shared in bigger teams.

-- Please before using any hook, read its documentation! --

:coffee:️ Features

  • Concise API
  • Small and lightweight
  • Easy to learn
  • Functional approach
  • Fully written in JS (although TS types are supported)

:star2: Live playground here :star2:

Install

by using npm :

$ npm install beautiful-react-hooks

by using yarn :

$ yarn add beautiful-react-hooks

:art: Hooks

:star2: Live playground here :star2:

Contributing

Contributions are very welcome and wanted.

To submit your custom hook, please make sure your read our CONTRIBUTING guidelines.

Before submittinga new merge request, please make sure:

  1. You have updated the package.json version and reported your changes into the CHANGELOG file
  2. make sure you run npm test and npm build before submitting your merge request.
  3. make sure you've added the documentation of your custom hook ( you can possibly use the HOOK_DOCUMENTATION_TEMPLATE to document your custom hook ).
  4. make sure you've updated the index.d.ts file with your hook types.

Made with

Credits

This library is provided and sponsored by:

As part of our commitment to support and contribute to the open source community.

Icon made by Freepik from www.flaticon.com


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

绝对价值

绝对价值

[美] 伊塔马尔·西蒙森 艾曼纽·罗森 / 钱峰 / 中国友谊出版公司 / 2014-7 / 45.00元

绝对价值指的是经用户体验的产品质量,即使用某件产品或者享受某项服务的切实感受。 过去,消费就像是押宝。一件商品好不好,一家餐馆的环境如何,没有亲身体验过消费者无从得知,只能根据营销人员提供的有限信息去猜测。品牌、原产地、价位、广告,这些重要的质量线索左右着消费者的选择。 然而,互联网和新兴科技以一种前所未有的速度改变了商业环境。当消费者可以在购买前查看到交易记录和消费者评价,通过便捷的......一起来看看 《绝对价值》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具