Implement reducers with handleActions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, redux
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu với ví dụ đã hoàn thành trong src/reducers/console.js, sau đó tìm các reducer chưa được kiểm tra clients, compiledProjects, currentProject, errors, googleClassroom, index, projects và user. Refactor chúng bằng redux-actions trong khi vẫn giữ nguyên hành vi, rồi chạy tất cả các test hiện có để xác nhận rằng chúng vẫn pass; để việc chuyển đổi các test Jest cho một thay đổi riêng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Currently most of our reducers are implemented as a big switch statement, which is unwieldy and hard to read. Instead, use the handleActions() helper in redux-actions to implement the reducer as a map of action names to reducer functions.
We should follow the pattern of using the action creator function itself as the map key, allowing us to avoid hard-coding string literals containing the action name.
See the console reducer for an example of the desired implementation.
Testing
Since our goal here is merely to refactor the reducers, not change their behavior, all existing tests should pass after a reducer is refactored.
However, it might make sense to also port the reducer test to Jest after completing the refactor and confirming that the old tests pass with the new reducer implementation (this should be in separate commits).
Reducers to migrate
-
clients -
compiledProjects -
console -
currentProject -
errors -
googleClassroom -
index -
projects -
resizableFlex -
ui -
user
- Ngôn ngữ chính
- JavaScript
- Star
- 191
- Fork
- 143
- Merge trung bình
- 4 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 5
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của popcodeorg/popcode
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
popcodeorg/popcode#2522 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
popcodeorg/popcode#2520 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
popcodeorg/popcode#2519 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
popcodeorg/popcode#2517 ·
-
User Feedback Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
popcodeorg/popcode#2516 ·
Tất cả issue của popcodeorg/popcode
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bevyengine/bevy-website#2595 ·