sandstone
sandstone copied to clipboard
WRQ-9660: Updated samples to use useReducer rather than redux
Checklist
- [x] I have read and understand the contribution guide
- [ ] A CHANGELOG entry is included
- [ ] At least one test case is included for this feature or bug fix
- [x] Documentation was added or is not needed
- [ ] This is an API breaking change
Issue Resolved / Feature Added
There are a total of 4 samples that use redux related libraries inside sandstone's samples. That's qa-virtuallist, qa-virtualgridlist, qa-virtualgridlistnative-preserve-focus, and event-logger. I have deleted redux related libraries to avoid increasing the number of libraries that need to be managed within the sample.
Resolution
The store implementation using redux was deleted and changed to the context and useReducer implementation. refer to : https://react.dev/learn/scaling-up-with-reducer-and-context
Additional Considerations
Links
WRQ-9660
Comments
Enact-DCO-1.0-Signed-off-by: Hyelyn Kim ([email protected])
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.66%. Comparing base (
0fb0222
) to head (96bf8b6
). Report is 11 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #1572 +/- ##
===========================================
+ Coverage 81.55% 81.66% +0.11%
===========================================
Files 148 148
Lines 6673 6775 +102
Branches 1986 2038 +52
===========================================
+ Hits 5442 5533 +91
- Misses 938 944 +6
- Partials 293 298 +5
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please merge the recent develop branch to solve the validate-docs error in travis.
Did you check the lint warnings? Please fix all of it. You can also check it locally using the enact lint --strict
command.
@mmyelyn, Please check console warning in qa-virtualgridlist sample. Also, scrolling doesn't seem to work in this sample.
@mmyelyn, Please check console warning in qa-virtualgridlist sample. Also, scrolling doesn't seem to work in this sample.
Fixed console warning and scrolling in qa-virtualgridlist. and also i found a timeout issue in event-logger. So I fixed that, Please refer to the link for more details about that issue.
@mmyelyn, I found one issue in qa-virtualgridlist sample. Could you please check it? When I set dataSize to 10, and change size with +, - buttons, the number of the dataSize is not changed and fixed at 10. However, in the original sample, the number of the dataSize is updated when changes size with +, - buttons.
@juwonjeong Sorry, It's fixed. Also, I was managing the value twice using useState, but I deleted it as it seemed unnecessary. In the process, I found missing cases and added to the reducer.
@mmyelyn , Please update your branch with the latest develop and fix the merge conflicts.
@MikyungKim Ok, All reviews have been reflected. Also, I accidentally commit the package-lock file, so I removed it.