Created
January 9, 2022 06:56
-
-
Save rickyalmeidadev/b72c0bbdf3e795377a660b72765e19bb to your computer and use it in GitHub Desktop.
Override useSelector type definition to recognize your application's state
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { RootState } from '@app/store'; | |
declare module 'react-redux' { | |
export function useSelector<TState = RootState, TSelected = unknown>( | |
selector: (state: TState) => TSelected, | |
equalityFn?: (left: TSelected, right: TSelected) => boolean, | |
): TSelected; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment