+
Skip to content

Conversation

nelsonni
Copy link
Member

@nelsonni nelsonni commented Dec 7, 2022

Description:

To adhere to best practices, as described in Usage with TypeScript, this PR updates the call signature for all invocations of useAppSelector to remove unnecessary RootState typings using the following pattern:

+  const new = useAppSelector(state => cardSelectors.selectById(state, cardId));
-  const old = useAppSelector((state: RootState) => cardSelectors.selectById(state, cardId));

This PR resolves #995, and signifies the following version changes (per Semantic Version):

  • PATCH version increase

Changes:

This PR makes the following changes:

Checklist:

Before submitting this PR, I have verified that my code:

  • Resides on a fix/ or feature/ branch that was initially branched off from development.
  • Passes code linting (yarn lint) and unit testing (yarn test).
  • Successfully builds a distribution package (yarn package).
  • I have read and am aware of the CONTRIBUTING guide for this project.
  • My name is listed in the Contributors section, or this PR includes a request to add my name.

@nelsonni nelsonni added the feature Feature requests or improvements label Dec 7, 2022
@nelsonni nelsonni merged commit 9867b4c into main Dec 7, 2022
@nelsonni nelsonni deleted the fix/removeRootStateTypes branch December 7, 2022 05:52
@nelsonni nelsonni self-assigned this Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Feature requests or improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unnecessary RootState typing when using useAppSelector

1 participant

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载