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

Updated react-redux and peer-dependencies #2300

Merged

Conversation

adithyanotfound
Copy link
Contributor

@adithyanotfound adithyanotfound commented Sep 27, 2024

Issue Number:

Fixes #2293

Did you add tests for your changes?

Not required.

Summary

  1. Changed the depreciated createStore to configureStore.
  2. Removed redux-thunk since it was no longer required.

Does this PR introduce a breaking change?

No.

Have you read the contributing guide?

Yes.

Summary by CodeRabbit

  • New Features

    • Introduced @reduxjs/toolkit for improved state management.
    • Added a custom hook useAppDispatch for enhanced type safety when dispatching actions.
  • Improvements

    • Updated react-redux and redux to their latest versions for enhanced functionality and performance.
    • Streamlined Redux store setup by transitioning to configureStore, simplifying middleware management.

Copy link
Contributor

coderabbitai bot commented Sep 27, 2024

Warning

Rate limit exceeded

@adithyanotfound has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 49 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Files that changed from the base of the PR and between 9f6735c and bd509bf.

Walkthrough

The pull request introduces significant updates to the state management libraries in the project. The package.json file has been modified to include a new dependency on @reduxjs/toolkit and to upgrade the versions of react-redux and redux. Additionally, the Redux store setup has been refactored to utilize configureStore from Redux Toolkit, streamlining the middleware application process. The usage of the useDispatch hook has also been replaced with a custom useAppDispatch hook across several components for improved type safety.

Changes

File Change Summary
package.json Added @reduxjs/toolkit version ^2.2.7; updated react-redux from ^7.2.5 to ^9.1.2; updated redux from ^4.1.1 to ^5.0.1.
src/components/.../EventDashboardScreen.tsx Replaced useDispatch with useAppDispatch.
src/components/.../OrganizationScreen.tsx Replaced useDispatch with useAppDispatch.
src/screens/UserPortal/UserScreen/UserScreen.tsx Replaced useDispatch with useAppDispatch.
src/state/hooks.ts Introduced useAppDispatch custom hook for typed dispatch.
src/state/store.ts Refactored store setup from createStore to configureStore, simplifying middleware handling.

Assessment against linked issues

Objective Addressed Explanation
Upgrade react-redux from 7.2.9 to 9.1.2 (2293)
Upgrade redux from 4.2.1 to 5.0.1 (2005)
Update codebase to adhere to new syntax and methods from upgraded packages (2057)
Remove unused or unnecessary packages if applicable (2005, 2057) Unused packages were not explicitly assessed.
Ensure compatibility of updated dependencies (2057)

Possibly related issues

Poem

🐰 In the garden of code, where bunnies play,
New tools and upgrades brighten the day.
With Redux Toolkit, we hop with glee,
Streamlined and swift, as happy as can be!
Dependencies dance, all fresh and new,
A joyful leap forward, just for you! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Our Pull Request Approval Process

We have these basic policies to make the approval process smoother for our volunteer team.

Testing Your Code

Please make sure your code passes all tests. Our test code coverage system will fail if these conditions occur:

  1. The overall code coverage drops below the target threshold of the repository
  2. Any file in the pull request has code coverage levels below the repository threshold
  3. Merge conflicts

The process helps maintain the overall reliability of the code base and is a prerequisite for getting your PR approved. Assigned reviewers regularly review the PR queue and tend to focus on PRs that are passing.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (1)
src/state/store.ts (1)

4-6: LGTM: Correct usage of configureStore

The store configuration has been successfully updated to use configureStore from Redux Toolkit. This change simplifies the setup and automatically includes commonly used Redux addons, including redux-thunk.

Consider adding a type annotation for better type inference:

-export const store = configureStore({
+export const store = configureStore<RootState>({
   reducer: reducers,
 });

This will help with type checking and autocompletion in components that use the store.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 959399d and 3312026.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • package.json (2 hunks)
  • src/state/store.ts (1 hunks)
🔇 Additional comments (6)
src/state/store.ts (2)

1-1: LGTM: Correct import for Redux Toolkit

The import statement has been updated to use configureStore from '@reduxjs/toolkit', which is in line with the PR objectives. This change correctly removes the need for separate imports from 'redux' and 'redux-thunk'.


1-6: Verify store functionality after migration

The migration to Redux Toolkit and the removal of explicit redux-thunk middleware look good. However, it's important to ensure that the store still functions as expected with these changes.

Please run the following script to check for any potential issues:

This script will help identify any potential issues or inconsistencies in the codebase after the migration. Please review the results and make any necessary adjustments.

✅ Verification successful

Store migration verified successfully

The migration to Redux Toolkit and the removal of explicit redux-thunk middleware have been successfully verified. No remaining usages of createStore or redux-thunk were found, and configureStore is used correctly. Reducers are properly imported and utilized across the codebase, and no type errors related to the store were detected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify store usage and potential issues after migration

# Test 1: Check if there are any remaining uses of createStore
echo "Checking for remaining uses of createStore:"
rg --type typescript 'createStore'

# Test 2: Verify that configureStore is used correctly
echo "Verifying correct usage of configureStore:"
rg --type typescript 'configureStore'

# Test 3: Check for any remaining explicit uses of redux-thunk
echo "Checking for explicit uses of redux-thunk:"
rg --type typescript 'redux-thunk'

# Test 4: Verify that reducers are still imported and used correctly
echo "Verifying reducer usage:"
rg --type typescript 'import.*reducers'
rg --type typescript 'reducer:.*reducers'

# Test 5: Check for any potential type errors related to the store
echo "Checking for potential type errors:"
rg --type typescript 'store\.'

Length of output: 863


Script:

#!/bin/bash
# Description: Verify store usage and potential issues after migration

# Test 1: Check if there are any remaining uses of createStore
echo "Checking for remaining uses of createStore:"
rg --type ts 'createStore'
rg --type tsx 'createStore'

# Test 2: Verify that configureStore is used correctly
echo "Verifying correct usage of configureStore:"
rg --type ts 'configureStore'
rg --type tsx 'configureStore'

# Test 3: Check for any remaining explicit uses of redux-thunk
echo "Checking for explicit uses of redux-thunk:"
rg --type ts 'redux-thunk'
rg --type tsx 'redux-thunk'

# Test 4: Verify that reducers are still imported and used correctly
echo "Verifying reducer usage:"
rg --type ts 'import.*reducers'
rg --type tsx 'import.*reducers'
rg --type ts 'reducer:.*reducers'
rg --type tsx 'reducer:.*reducers'

# Test 5: Check for any potential type errors related to the store
echo "Checking for potential type errors:"
rg --type ts 'store\.'
rg --type tsx 'store\.'

Length of output: 2706


Script:

#!/bin/bash
# Description: Verify store usage and potential issues after migration

# Test 1: Check if there are any remaining uses of createStore
echo "Checking for remaining uses of createStore:"
rg 'createStore' --glob '*.ts' --glob '*.tsx'

# Test 2: Verify that configureStore is used correctly
echo "Verifying correct usage of configureStore:"
rg 'configureStore' --glob '*.ts' --glob '*.tsx'

# Test 3: Check for any remaining explicit uses of redux-thunk
echo "Checking for explicit uses of redux-thunk:"
rg 'redux-thunk' --glob '*.ts' --glob '*.tsx'

# Test 4: Verify that reducers are still imported and used correctly
echo "Verifying reducer usage:"
rg 'import.*reducers' --glob '*.ts' --glob '*.tsx'
rg 'reducer:.*reducers' --glob '*.ts' --glob '*.tsx'

# Test 5: Check for any potential type errors related to the store
echo "Checking for potential type errors:"
rg 'store\.' --glob '*.ts' --glob '*.tsx'

Length of output: 2467

package.json (4)

23-23: Excellent addition of @reduxjs/toolkit!

The addition of @reduxjs/toolkit version ^2.2.7 is a great improvement. This package simplifies Redux development by providing utilities for common tasks, including the configureStore function mentioned in the PR objectives. It will help modernize the Redux setup and potentially reduce boilerplate code.


56-56: Approved: redux upgrade to ^5.0.1

The upgrade of redux to version ^5.0.1 complements the react-redux upgrade and the addition of @reduxjs/toolkit. This is a good move to keep the Redux ecosystem up-to-date.

As this is a major version upgrade and the PR objectives mention removing redux-thunk middleware, please verify the following:

  1. Ensure that all direct uses of redux in the codebase are compatible with version 5.
  2. Confirm that redux-thunk middleware has been removed as mentioned in the PR objectives.

Run the following script to help identify areas that may need attention:

#!/bin/bash
# Search for redux imports and usages, including redux-thunk
rg --type typescript --type typescriptreact 'from [\'"]redux[\'"]|redux-thunk' -A 10

23-23: Summary of Redux ecosystem updates

The changes to the Redux ecosystem (adding @reduxjs/toolkit, upgrading react-redux and redux) are consistent with the PR objectives and represent a significant update to the state management approach in the project.

To ensure the stability of the application after these major updates:

  1. Conduct thorough testing of all Redux-related functionality in the application.
  2. Update any documentation related to the Redux setup and usage in the project.
  3. Verify that all developers are aware of the new Redux setup using @reduxjs/toolkit.

Run the following script to get an overview of Redux usage in the project:

#!/bin/bash
# Get an overview of Redux usage in the project
echo "Files using Redux:"
rg --type typescript --type typescriptreact 'from [\'"](@reduxjs/toolkit|react-redux|redux)[\'"]' --files-with-matches

echo "\nTotal Redux usage count:"
rg --type typescript --type typescriptreact 'from [\'"](@reduxjs/toolkit|react-redux|redux)[\'"]' --count

Also applies to: 52-52, 56-56


52-52: Approved: react-redux upgrade to ^9.1.2

This upgrade aligns perfectly with the PR objectives. Great job on updating to the latest stable version.

As this is a major version upgrade, please ensure that all usages of react-redux in the codebase are compatible with version 9. Run the following script to identify potential areas that may need attention:

coderabbitai[bot]
coderabbitai bot previously approved these changes Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.54%. Comparing base (959399d) to head (bd509bf).
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2300   +/-   ##
========================================
  Coverage    97.54%   97.54%           
========================================
  Files          241      242    +1     
  Lines         6887     6888    +1     
  Branches      2018     2005   -13     
========================================
+ Hits          6718     6719    +1     
  Misses         157      157           
  Partials        12       12           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Outside diff range and nitpick comments (1)
src/components/OrganizationScreen/OrganizationScreen.tsx (1)

4-4: LGTM! Consider consolidating imports.

The addition of useAppDispatch from 'state/hooks' is a good practice, likely providing a typed version of the dispatch hook. This aligns well with the PR objectives of updating react-redux usage.

Consider consolidating the react-redux related imports for better readability:

-import { useSelector } from 'react-redux';
+import { useSelector } from 'react-redux';
 import { Navigate, Outlet, useLocation, useParams } from 'react-router-dom';
 import { updateTargets } from 'state/action-creators';
-import { useAppDispatch } from 'state/hooks';
+import { useAppDispatch } from 'state/hooks';

Also applies to: 7-7

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 3312026 and 9f6735c.

📒 Files selected for processing (5)
  • src/components/EventDashboardScreen/EventDashboardScreen.tsx (2 hunks)
  • src/components/OrganizationScreen/OrganizationScreen.tsx (2 hunks)
  • src/screens/UserPortal/UserScreen/UserScreen.tsx (2 hunks)
  • src/state/hooks.ts (1 hunks)
  • src/state/store.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/state/store.ts
🔇 Additional comments (10)
src/state/hooks.ts (2)

1-5: LGTM! Well-implemented custom dispatch hook.

The implementation of useAppDispatch is a good practice for TypeScript projects using Redux. It provides a strongly-typed dispatch function, which will enhance type safety when dispatching actions throughout the application.


1-5: Verify the implementation and usage of Redux changes across the codebase.

To ensure that the changes related to the react-redux upgrade are consistently applied throughout the project, please run the following verification scripts:

These scripts will help us confirm that:

  1. The new useAppDispatch hook is being used in the codebase.
  2. createStore has been replaced with configureStore.
  3. There are no remaining references to redux-thunk.
  4. The react-redux version in package.json matches the intended upgrade (9.1.2).

Please review the output of these scripts and make any necessary adjustments to ensure consistency across the codebase.

✅ Verification successful

Please update and run the following verification scripts to ensure all Redux changes are correctly implemented:


Redux changes have been successfully implemented and verified.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation and usage of Redux changes across the codebase.

echo "1. Checking usage of useAppDispatch:"
rg --type typescript --type typescript "useAppDispatch"

echo "\n2. Verifying removal of createStore and implementation of configureStore:"
rg --type typescript --type typescript "createStore|configureStore"

echo "\n3. Checking for any remaining redux-thunk references:"
rg --type typescript --type typescript "redux-thunk"

echo "\n4. Verifying the react-redux version in package.json:"
jq '.dependencies["react-redux"]' package.json

Length of output: 827


Script:

#!/bin/bash
# Description: Verify the implementation and usage of Redux changes across the codebase.

echo "1. Checking usage of useAppDispatch in TypeScript files:"
rg --glob '*.ts' --glob '*.tsx' "useAppDispatch"

echo "\n2. Verifying removal of createStore and implementation of configureStore in TypeScript files:"
rg --glob '*.ts' --glob '*.tsx' "createStore|configureStore"

echo "\n3. Checking for any remaining redux-thunk references in TypeScript files:"
rg --glob '*.ts' --glob '*.tsx' "redux-thunk"

echo "\n4. Verifying the react-redux version in package.json:"
jq '.dependencies["react-redux"]' package.json

Length of output: 1618

src/screens/UserPortal/UserScreen/UserScreen.tsx (3)

61-61: LGTM: Dispatch initialization updated correctly.

The change from useDispatch() to useAppDispatch() is consistent with the import changes and aligns with the react-redux upgrade. This modification ensures that the component uses the new custom hook for dispatching actions.


Line range hint 1-138: Verify handling of asynchronous actions after redux-thunk removal.

While the changes in this file are correct, the PR objectives mention removing redux-thunk middleware. It's crucial to ensure that all asynchronous operations previously relying on redux-thunk have been updated accordingly throughout the application.

Please run the following script to check for any remaining uses of redux-thunk or potential issues with asynchronous action creators:

#!/bin/bash
# Description: Check for redux-thunk usage and potential async issues

# Test: Look for any remaining imports of redux-thunk
rg --type typescript 'import.*redux-thunk'

# Test: Check for potential async action creators that might need updating
rg --type typescript 'export const \w+ = \(.*\) => async \(dispatch'

# Test: Verify that configureStore is not using redux-thunk
ast-grep --lang typescript --pattern $'configureStore({
  $$$
  middleware: $$$
  $$$
})'

If any results are found, please review those files to ensure they've been properly updated to work without redux-thunk.


2-2: LGTM: Import changes align with react-redux upgrade.

The changes to the imports are consistent with upgrading react-redux and using a custom useAppDispatch hook. This approach can provide better type inference and potentially centralize any middleware or store configuration.

To ensure the custom hook is properly implemented, please run the following script:

Also applies to: 5-5

✅ Verification successful

Verification Successful: useAppDispatch implemented correctly and redux-thunk removed.

All usages of useDispatch have been replaced with useAppDispatch where necessary. Additionally, the redux-thunk middleware has been successfully removed from the dependencies and middleware configurations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the implementation of useAppDispatch custom hook

# Test: Check the implementation of useAppDispatch
ast-grep --lang typescript --pattern $'export const useAppDispatch = $$$'

# Test: Ensure useAppDispatch is using the new configureStore
rg --type typescript 'configureStore.*useAppDispatch'

Length of output: 276


Script:

#!/bin/bash
# Description: Verify the implementation of useAppDispatch custom hook with corrected file type

# Test: Check the implementation of useAppDispatch
ast-grep --lang typescript --pattern $'export const useAppDispatch = $$$'

# Test: Ensure useAppDispatch is using the new configureStore
rg 'configureStore.*useAppDispatch' --type ts --type tsx

Length of output: 250


Script:

#!/bin/bash
# Description: Verify the implementation of useAppDispatch custom hook with corrected rg command

# Test: Check the implementation of useAppDispatch
ast-grep --lang typescript --pattern $'export const useAppDispatch = $$$'

# Test: Ensure useAppDispatch is using the new configureStore
rg 'configureStore.*useAppDispatch' -g '*.ts' -g '*.tsx'

Length of output: 222


Script:

#!/bin/bash
# Description: Further verify the useAppDispatch hook and removal of redux-thunk

# Test 1: Ensure useAppDispatch is used instead of useDispatch
rg 'useDispatch' -g '*.ts' -g '*.tsx' --context 1

# Test 2: Ensure useAppDispatch is imported where used
rg 'useAppDispatch' -g '*.ts' -g '*.tsx' --context 1

# Test 3: Verify that redux-thunk is removed from dependencies
rg 'redux-thunk' -g 'package.json'

# Test 4: Ensure redux-thunk is not included in middleware configurations
rg 'redux-thunk' -g '*.ts' -g '*.tsx'

Length of output: 2299

src/components/OrganizationScreen/OrganizationScreen.tsx (2)

48-48: LGTM! Correct usage of useAppDispatch.

The replacement of useDispatch with useAppDispatch is correct and aligns with the PR objectives. The rest of the component logic using dispatch remains unchanged, which is good.


Line range hint 1-168: Verify project-wide react-redux updates.

The changes in this file are minimal and correctly implement the use of useAppDispatch. This aligns with the PR objectives of upgrading react-redux. However, to ensure a comprehensive update:

  1. Verify that similar changes have been made in other components using react-redux.
  2. Check if there are any remaining uses of the deprecated createStore function that need to be replaced with configureStore.
  3. Confirm that redux-thunk middleware has been removed from the project if it's no longer needed.

Run the following script to check for remaining uses of deprecated react-redux features:

This will help ensure that the react-redux upgrade has been consistently applied across the project.

src/components/EventDashboardScreen/EventDashboardScreen.tsx (3)

7-7: Approval: Good addition of useAppDispatch

The introduction of useAppDispatch from a custom hooks file is a positive change. This approach typically provides better type inference for dispatch actions, which aligns well with the upgrade to react-redux 9.1.2. It enhances type safety and can improve developer experience by providing better autocomplete suggestions.


Line range hint 1-186: Summary: Successful update to useAppDispatch

The changes in this file are minimal and correctly implement the transition to useAppDispatch. This aligns well with the PR objectives of upgrading react-redux. The component's logic remains unchanged, which reduces the risk of introducing bugs.

To ensure consistency across the codebase, please run the following script:

#!/bin/bash
# Description: Find other files that might need similar updates

# Test 1: Find files still using useDispatch from react-redux
echo "Files still using useDispatch from react-redux:"
rg --type typescript 'import.*useDispatch.*from.*react-redux'

# Test 2: Find files using dispatch that might need updating
echo "Files using dispatch that might need updating:"
rg --type typescript 'const dispatch = useDispatch\(\)'

If these tests return results, consider updating those files to use useAppDispatch as well.


62-62: Approval: Correct implementation of useAppDispatch

The change from useDispatch to useAppDispatch is correct and consistent with the new import. This modification aligns with the react-redux upgrade mentioned in the PR objectives.

To ensure type safety across all dispatch calls, please run the following script:

If the script returns any results, please manually verify that these dispatch calls are compatible with the new useAppDispatch implementation.

src/state/hooks.ts Outdated Show resolved Hide resolved
@palisadoes palisadoes merged commit e009361 into PalisadoesFoundation:develop Sep 28, 2024
11 of 12 checks passed
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.

2 participants