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