Giter Site home page Giter Site logo

hooks's Introduction

hero
actions
text link
Getting Started
/getting-started

此仓库已废弃

重要: 此仓库后续不再维护,也不再接受更多的特性更新。wetrial/hooks 将会迁移至 wetrial/wetrials 仓库进行后续的维护,访问 https://wetrial.github.io/wetrials/hooks/ajax 了解更多。此变更不影响继续使用 @wetrial/hooks 这个 npm 包名安装使用此组件。

@wetrial/hooks

基于 ahooks 的 hooks 库

NPM version NPM downloads

📚 文档

✨ 特性

  • 易学易用
  • 包含大量提炼自应用的高级 Hooks。
  • 包含丰富的基础 Hooks。
  • 使用 TypeScript 构建,提供完整的类型定义文件。

📣 说明

你可以将 ahooks 使用在任何地方,和任意组件库搭配使用。 虽然我们的代码示例都是基于 ant design 的,但是并不代表我们的 Hooks 只能和 ant design 配合使用。

📦 安装

npm i @wetrial/hooks --save

🔨 使用

import { useFormTable } from '@wetrial/hooks';

🖥 开发

$ git clone [email protected]:wetrial/hooks.git
$ cd hooks
$ npm run init
$ npm start

打开浏览器访问 http://127.0.0.1:8001

🤝 贡献

我们欢迎所有人参与共建,请参考CONTRIBUTING.MD

✅ License

MIT

基于 https://github.com/alibaba/hooks,建议实际使用过程中 同时安装 ahooks 库

按需加载

可以通过以下的写法来按需加载 Hooks。

import useFormTable from '@wetrial/hooks/es/useFormTable';

注意:Umi Hooks 默认支持基于 ES module 的 tree shaking,对于 js 部分,直接引入 import { useFormTable } from '@wetrial/hooks' 也会有按需加载的效果。

如果你使用了 babel,那么可以使用 babel-plugin-import 来进行按需加载,加入这个插件后。你可以仍然这么写:

import { useFormTable } from '@wetrial/hooks';

插件会帮你转换成 @wetrial/hooks/es/useFormTable 的写法。

hooks's People

Contributors

xiexingen avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.