123
This commit is contained in:
@@ -21,7 +21,7 @@ export default function App(){
|
|||||||
<div>
|
<div>
|
||||||
<h2>当前users中count的值为:{count}</h2>
|
<h2>当前users中count的值为:{count}</h2>
|
||||||
<div>
|
<div>
|
||||||
<button onClick={() => dispatch(increment(66))}>count+1</button>
|
<button onClick={() => dispatch(increment())}>count+1</button>
|
||||||
<button onClick={() => dispatch(decrement())}>count-1</button>
|
<button onClick={() => dispatch(decrement())}>count-1</button>
|
||||||
<button onClick={() => dispatch(incrementByAmount(-10))}>count-10</button>
|
<button onClick={() => dispatch(incrementByAmount(-10))}>count-10</button>
|
||||||
<button onClick={() => dispatch(incrementByAmount(10))}>count+10</button>
|
<button onClick={() => dispatch(incrementByAmount(10))}>count+10</button>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class Count extends Component{
|
|||||||
</select>
|
</select>
|
||||||
<button onClick={this.increement}>+</button>
|
<button onClick={this.increement}>+</button>
|
||||||
<button onClick={this.decreement}>-</button>
|
<button onClick={this.decreement}>-</button>
|
||||||
<button onClick={this.increementOdd}>计数再加</button>
|
<button onClick={this.increementOdd}>奇数再加</button>
|
||||||
<button onClick={this.increementSync}>异步再加</button>
|
<button onClick={this.increementSync}>异步再加</button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -65,6 +65,5 @@ const CountContainer=connect(
|
|||||||
jian:createDecreementAction,
|
jian:createDecreementAction,
|
||||||
jiaAsync:createIncreementAsyncAction,
|
jiaAsync:createIncreementAsyncAction,
|
||||||
}
|
}
|
||||||
)
|
)(Count)
|
||||||
(Count)
|
|
||||||
export default CountContainer
|
export default CountContainer
|
||||||
Reference in New Issue
Block a user