반응형
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
- array
- component
- leetcode
- BinaryTree
- DP
- event
- state
- React
- 비트연산
- axios
- route
- JSX
- css
- map
- Context
- count
- treenode
- UE5
- Callback
- nodeJS
- c++
- bit
- queue
- MySQL
- routes
- node.js
- Props
- server
- priority_queue
- Navigation
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