react-routine:简单的有状态React组件

时间:2021-05-19 03:03:17
【文件属性】:
文件名称:react-routine:简单的有状态React组件
文件大小:77KB
文件格式:ZIP
更新时间:2021-05-19 03:03:17
react JavaScript React例程 一个简单的替代API,用于编写有状态的React组件。 有了它,您可以: 通过按时间顺序执行来简化组件中的数据流 当您期望生命周期事件和回调时明确声明 编写简短易懂的组件 注意: react-routine当前不稳定,可能会有一些重大变化 安装 yarn add react-routine # npm install --save react-routine 示例脚本 import React from 'react' import { routine , setState , componentWillMount , createHandlers } from 'react-routine' const controller = function * ( ) { // Get the initial props const initial = yield c
【文件预览】:
react-routine-master
----.gitignore(36B)
----.flowconfig(18B)
----package.json(1024B)
----src()
--------effects.js(2KB)
--------routine.js(4KB)
--------index.js(542B)
--------__tests__()
--------utils.js(638B)
----.travis.yml(219B)
----LICENSE(1KB)
----CHANGELOG.md(407B)
----flow-typed()
--------npm()
----examples()
--------webpack.config.js(463B)
--------index.js(950B)
--------index.html(75B)
----README.md(2KB)
----docs()
--------getting-started.md(5KB)
----.prettierrc(30B)
----yarn.lock(225KB)

网友评论