vicb / windy-plugin-sounding

Sounding plugin for Windy.com.
https://www.windy.com/
MIT License
19 stars 5 forks source link

create store with redux-toolkit (rtk) #18

Closed johnmarkredding closed 3 months ago

johnmarkredding commented 4 months ago

Switched from redux createStore to rtk configureStore. Exported custom store type (AppStore) to include strong typing for the specifics of our state.

I want to have this pulled to see if we're on the right track, and this will play nicely before moving on.

The next steps I see are using slices instead of actions/reducers explicitly, but that will take more time as there are some expections to the normal action and reducer patterns I see. Ex: 'cancelSubscriptions' doesn't belong to a reducer in the way that the other actions do. Also the functions computeForecasts and forecasts in the reducer for sounding.ts don't fit super nicely into the slice pattern, but we can make that work fine, if we want to go with slices.

vicb commented 4 months ago

Thank you so much @johnmarkredding ! I'll review the PR tomorrow CET

vicb commented 4 months ago

Thanks @johnmarkredding, the PR looks great.

I'll merge it next week when I'm back home - do not worry about the conflicting npm-shrinkwrap.json, I'll re-generate this one after the commits are merged.

vicb commented 3 months ago

I have just merged the PR, thanks!