pcluster-manager icon indicating copy to clipboard operation
pcluster-manager copied to clipboard

Add types to the Redux store

Open mtfranchetto opened this issue 2 years ago • 0 comments

Description

Types are great. Following what has been done with #244 we should add types to the Redux store as well.

The types can be static (added manually) or dynamically, based on the reducers composing the store. Given the dynamic nature of the PCM store, and all the related setState/useState calls, a static typing it's probably easier to implement, even if changes to the store will require a manual update to the types.

Stretch goal

Add typings also for setState/useState functions to have type checking for every operation on the store and avoid manual upcast/downcast.

mtfranchetto avatar Aug 18 '22 10:08 mtfranchetto