Migrate to use redux-remember instead of redux-persist#4379
Open
zehata wants to merge 3 commits into
Open
Conversation
- This was squashed from a number of commits from https://github.com/zehata/nusmods/tree/redux-remember-test
Contributor
|
PR author is not in the allowed authors list. |
|
@zehata is attempting to deploy a commit to the modsbot's projects Team on Vercel. A member of the Team first needs to authorize it. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #4379 +/- ##
==========================================
+ Coverage 54.52% 56.26% +1.74%
==========================================
Files 274 310 +36
Lines 6076 6981 +905
Branches 1455 1689 +234
==========================================
+ Hits 3313 3928 +615
- Misses 2763 3053 +290 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Previous state during rehydration is not the default state, but rather the rehydrated state itself
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
redux-persist is last committed to in 2021.
Objectively speaking, this is adding technical debt dating back to 2020: 4b484cf.
nusmods/website/src/reducers/timetables.ts
Lines 38 to 41 in 9e0e84f
nusmods/website/src/reducers/timetables.ts
Lines 47 to 50 in 9e0e84f
nusmods/website/src/reducers/moduleBank.ts
Lines 137 to 140 in 9e0e84f
With the push to move towards agentic involvement, #4314, there may be a need to migrate over to a more recent solution.
To be quite honest, I didn't spend too long looking for an alternative, and redux-remember is the only one I have found. You should try looking for alternatives to redux-persist and redux-remember to decide if this is a prudent replacement.
Implementation
WIP
Note that I am not removing the redux-persist key-values in localStorage, just in case something goes wrong and we need to rollback. It will be trivial to remove in a future PR, perhaps along with the migration code.
Other Information
Obviously, with such a fundamental change to how we are storing user data, I think it is only prudent if we wait until the end of the semester.