Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including refast with all npm packages installed. Try it out:

var refast = require("refast")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

refast v2.1.1

5 分钟就能学会的 React 状态管理工具

Refast

refast logo

5分钟就能学会的 React 组件状态管理工具

npm version download Packagist

npm install refast

主要优势

  • 概念少,学习成本较低。
  • 搭配 async-await 异步操作更加流畅

文档示例

Refast 的文档在 doc.refast.cn

Demo 请看 demo.refast.cn

安装使用

通过 npm 安装

Refast 可以通过 npm 安装到项目中: npm install refast --save

通过 CDN 引用

Refast 可以通过 CDN 引入到项目中。

  • 每次均引入最新版本: https://unpkg.com/refast/dist/index.js

  • 引入指定版本。用版本号替换 [version] 部分的内容即可: https://unpkg.com/refast@[version]/dist/index.js

开源协议

Refast 采用 MIT 协议开源。

浏览器支持

Refast 的实现使用到了 Promise。如果您的浏览器不支持 Promise,请加入相应的 pollfill,比如 lie:

<script src="https://g.alicdn.com/platform/c/lie/3.0.2/dist/lie.polyfill.min.js"></script>

感谢

感谢以下同学提供的帮助:

@zhangyang

@ex90rts

@yize

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free