반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
Tags
- Context
- nodeJS
- css
- MySQL
- node.js
- axios
- Navigation
- c++
- event
- Props
- queue
- routes
- treenode
- count
- 비트연산
- state
- UE5
- route
- bit
- array
- leetcode
- map
- JSX
- component
- server
- React
- BinaryTree
- Callback
- priority_queue
- DP
Archives
- Today
- Total
목록Reducer (1)
우사미 코딩
import Button from "../components/Button" import { useReducer } from "react"; import Panel from "../components/Panel" const INCREMENT_COUNT = 'increment'; const DECREMENT_COUNT = 'decrement'; const SET_VALUE_TO_ADD = 'set-value-to-add'; const ADD_VALUE_TO_COUNT = 'add-value-to-count'; const reducer = (state, action) => { switch(action.type){ case INCREMENT_COUNT: return { ...state, count: state...
React
2023. 7. 2. 13:54