Skip to content

Convert Java Lab console redux to redux-toolkit - #51215

Merged
molly-moen merged 3 commits into
stagingfrom
molly/javalab-console-redux
Apr 10, 2023
Merged

Convert Java Lab console redux to redux-toolkit#51215
molly-moen merged 3 commits into
stagingfrom
molly/javalab-console-redux

Conversation

@molly-moen

Copy link
Copy Markdown
Contributor

Part of ongoing work to migrate the Java Lab redux store to redux-toolkit. No functionality change here.

Links

Testing story

Tested locally that all the redux functionality works as it did before.

PR Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@molly-moen
molly-moen requested a review from a team April 7, 2023 18:42

@sanchitmalhotra126 sanchitmalhotra126 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! one minor comment otherwise LGTM

Comment thread apps/src/javalab/redux/consoleRedux.ts Outdated
// Redux store for state that relates to the Java Lab console.
import { PayloadAction, createSlice } from "@reduxjs/toolkit";

interface ConsoleLog {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious - will we be using interface instead of type as our standard approach for state? Just reading documentation about how we can declare either.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! The typescript docs are mostly un-opinionated about which to use, but do say " If you would like a heuristic, use interface until you need to use features from type.", so we've been going with that so far.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation! Looking forward to migrating to TS.

@molly-moen
molly-moen merged commit 6862ec2 into staging Apr 10, 2023
@molly-moen
molly-moen deleted the molly/javalab-console-redux branch April 10, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants