deephaven / web-client-ui

Deephaven Web Client UI
Apache License 2.0
29 stars 31 forks source link

Update react-redux to v8 #2290

Open mofojed opened 1 week ago

mofojed commented 1 week ago

Migration instructions here: https://github.com/reduxjs/react-redux/releases/tag/v8.0.0

Might be as easy as just bumping the version number.

Note that upgrading to v9 would be a breaking change and require quite a bit of work.

mofojed commented 1 week ago

Seems it's not just as easy as bumping version number. Some of the errors encountered:

...
packages/code-studio/src/settings/FormattingSectionContent.tsx:658:4 - error TS2345: Argument of type 'typeof FormattingSectionContent' is not assignable to parameter of type 'ComponentType<never>'.
  Type 'typeof FormattingSectionContent' is not assignable to type 'ComponentClass<never, any>'.
    Types of property 'defaultProps' are incompatible.
      Type '{ scrollTo: () => void; }' is not assignable to type 'undefined'.

658 })(FormattingSectionContent);
       ~~~~~~~~~~~~~~~~~~~~~~~~

packages/code-studio/src/settings/SettingsMenu.tsx:252:14 - error TS2322: Type '{}' is not assignable to type 'never'.

252             <FormattingSectionContent />
                 ~~~~~~~~~~~~~~~~~~~~~~~~

packages/code-studio/src/settings/ThemeSectionContent.tsx:28:16 - error TS2345: Argument of type 'ThunkAction<Promise<CustomizableWorkspace>, RootState, never, PayloadAction<unknown>>' is not assignable to parameter of type 'AnyAction'.

28       dispatch(updateSettings({ gridDensity: density }));
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

packages/code-studio/src/styleguide/StyleGuideInit.tsx:55:4 - error TS2345: Argument of type 'typeof StyleGuideInit' is not assignable to parameter of type 'ComponentType<never>'.
  Type 'typeof StyleGuideInit' is not assignable to type 'FunctionComponent<never>'.
    Types of property 'propTypes' are incompatible.
      Type '{ workspace: PropTypes.Requireable<PropTypes.InferProps<{}>>; setWorkspace: PropTypes.Validator<(...args: any[]) => any>; }' is not assignable to type 'undefined'.

55 })(StyleGuideInit);
      ~~~~~~~~~~~~~~
...