hodcroftlab / covariants

Real-time updates and information about key SARS-CoV-2 variants, plus the scripts that generate this information.
https://covariants.org/
GNU Affero General Public License v3.0
316 stars 111 forks source link

refactor(web): remove redux, add recoil #278

Closed ivan-aksamentov closed 2 years ago

ivan-aksamentov commented 2 years ago

This swaps state management framework from redux to recoil.

Recoil is more modern, ergonomic, plays nicely with React hooks, and, hopefully with async rendering.

I am planing to introduce some serious modifications to the app state shortly, so it is better to make the swap before that, to avoid basically writing the thing twice.

So far we used redux for just a couple of things:

Both are kind of redundant also. I made navbar to use the pathname from the Next.js router, and moved dropdown state into a recoil atom.

In this PR, there should be no visual or behavioral changes in the application. If there is, it's a bug.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hodcroftlab/covariants/F9b4BDw1TNtgpc14hYmXRr1RtNPt
✅ Preview: https://covariants-git-refactor-change-redux-to-recoil-hodcroftlab.vercel.app