Skip to content
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-actions): refactor redux types to use generics #1337

Merged
merged 3 commits into from
Mar 24, 2021

Conversation

orbitalsqwib
Copy link
Contributor

Problem

Duplicate boilerplate code exists where Redux actions are present. By addressing this issue, not only will we adhere to the DRY principle, but it will also help ensure that all Redux actions are typed correctly throughout the codebase.

Closes #938

Solution

  • Implemented generic redux actions interfaces through intersection type extensions
  • Refactored redux type definitions to use generic interfaces

@orbitalsqwib orbitalsqwib requested a review from LoneRifle March 22, 2021 09:18
- Implemented generic redux actions interfaces through intersection type extensions
- Refactored redux type definitions to use generic interfaces

fix #938
- Defined another type to save on the repetition of ampersands (DRY principle)
- Refactored Redux actions to adopt other type when appropriate

fix #938
@orbitalsqwib orbitalsqwib force-pushed the refactor/redux-actions branch from 12668ea to 3225d5c Compare March 24, 2021 04:06
@LoneRifle LoneRifle merged commit 2ef715b into develop Mar 24, 2021
@LoneRifle LoneRifle deleted the refactor/redux-actions branch March 24, 2021 06:29
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.

Extract Redux actions patterns with generics
4 participants