-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: redux store #4485
refactor: redux store #4485
Conversation
trying to streamline the file names
exported by index file
without initializeBoard
we should test the outcome instead of the action.
# Conflicts: # src/components/Column/ColumnSettings.tsx # src/components/LoginProviders/LoginProviders.tsx
it's added implicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT, just a one or two questions that are more for clarification.
The deployment to the dev cluster was successful. You can find the deployment here: https://4485.development.scrumlr.fra.ics.inovex.io Deployed Images
|
Description
Since the major update of Redux to 2.x, the former store didn't quite work anymore with TS. Thus, it had to be refactored to the latest standards.
Key Features:
New directory layout:
For this,
git mv
was so all files retain their git history.Actions
Actions are created using the
createAction
function, for example:Reducers
Reducers are created using
createReducer
, and use thebuilder
pattern to switch between the different cases.I didn't opt for using slices because some thunks are used in the reducer as well, so we needed
extraReducers
usingbuilder
anyways.Thunks
Formerly called "middleware", we now use thunks for actions which require side effects (like async API calls). The "Toast to retry"-mechanic has been abstracted:
The above function can be dispatched like any other action.
Store
ApplicationState
type is now inferred by the storeuseAppDispatch
is now also exported from the storeChangelog
redux-toolkit
.useAppDispatch
fromstore
store.md
explaining how the store in further detail and how to use it.Checklist
(Optional) Visual Changes