-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Typescript support for react-redux selector and dispatch #6716
Conversation
- Create `useTypedSelector` & `useTypedDispatch` hooks for typescript support - Replace all files with the created hooks
39360c7
to
9c67ff8
Compare
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.
Awesome work! - Just one thing, perhaps we should use a vite plugin instead of declaring the paths manually to ensure our paths are a single point of truth?
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.
Can we use https://www.npmjs.com/package/vite-tsconfig-paths instead?
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.
Same as the vite config comment (Can we use https://www.npmjs.com/package/vite-tsconfig-paths instead?)
Yes, sure! I didn't know of this.. I'll do it. Thanks! π |
4ae9a0e
to
eb6eac5
Compare
for more information, see https://pre-commit.ci
Quality Gate passedIssues Measures |
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.
LGTM! Great work π
What type of PR is this?
Describe this PR
The code changes in the PR will remove the requirement to specify type for redux state in each selector.
This results in better typescript code.
Changes
useSelector
&useDispatch
hooks