nextstrain / auspice

Web app for visualizing pathogen evolution
https://docs.nextstrain.org/projects/auspice/
GNU Affero General Public License v3.0
292 stars 161 forks source link

Migrate to modern Redux #1711

Open victorlin opened 1 year ago

victorlin commented 1 year ago

Redux was adopted in Auspice many years ago. Since then, Redux has developed new features to simplify usage (e.g. Redux Toolkit, hooks API).

Steps from the migration guide (doesn't have to be followed in order):

jameshadfield commented 1 year ago

Victor & I spoke about this briefly today. Having types flow through is really nice (e.g. #1710) however the work involved in moving from (non-trivial) class-components to hooks shouldn't be underestimated. Changing to createSlice looks to be a similar amount of work, and my intuition is that having a codebase using a mixture of createSlice and our current (and previously recommended) approach will be hard to reason with.

victorlin commented 3 weeks ago

I tried porting the tree reducers to createSlice briefly while working on #1864. Didn't get very far (69245533e6e0f342f4a0379730369b4ab4709afa), but my impression is that it's not easy or maybe even impossible to have a mixed codebase.