Convert Java Lab console redux to redux-toolkit - #51215
Merged
Merged
Conversation
sanchitmalhotra126
approved these changes
Apr 7, 2023
sanchitmalhotra126
left a comment
Contributor
There was a problem hiding this comment.
nice! one minor comment otherwise LGTM
| // Redux store for state that relates to the Java Lab console. | ||
| import { PayloadAction, createSlice } from "@reduxjs/toolkit"; | ||
|
|
||
| interface ConsoleLog { |
Contributor
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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.
Contributor
There was a problem hiding this comment.
Thanks for the explanation! Looking forward to migrating to TS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: