1. Các bước làm 1-1. Import useReducer import { useReducer } from 'react' 1-2. Khởi tạo giá trị ban đầu const initialState = 0 1-3. Tạo hàm reducer Hàm này nhận 2 tham số Tham số 1 là state muốn thay đổi giá trị Tham số 2 là action Tùy vào loại acti...

Markdown supported · ⌘↵ to post
No responses yet.