1 Star 0 Fork 0

xuwentao/redux-saga-practice

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Counter.js 683 Bytes
一键复制 编辑 原始数据 按行查看 历史
xuwentao 提交于 2021-12-18 20:04 +08:00 . first commit
import React from 'react'
import { PropTypes } from 'prop-types';
const Counter = ({ value, onIncrement, onDecrement ,onIncrementAsync}) =>
<div>
<button onClick={onIncrement}>
Increment
</button>
{' '}
<button onClick={onDecrement}>
Decrement
</button>
<br/>
<button onClick={onIncrementAsync}>
INCREMENT_ASYNC
</button>
<hr />
<div>
Clicked: {value} times
</div>
</div>
Counter.propTypes = {
value: PropTypes.number.isRequired,
onIncrement: PropTypes.func.isRequired,
onDecrement: PropTypes.func.isRequired
}
export default Counter
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/coder-xuwentao/redux-saga-practice.git
git@gitee.com:coder-xuwentao/redux-saga-practice.git
coder-xuwentao
redux-saga-practice
redux-saga-practice
master

搜索帮助