I had the following code to define a typed selector with Redux in TypeScript:
import { useSelector, TypedUseSelectorHook } from 'react-redux';
export interface RootState {
user: {
account: string;
}
};
export const useTypedSelector: TypedUseSelectorHook<RootState> = useSelector;
Now I see that TypedUseSelectorHook is deprecated and should be replaced by createSelectorHook<State, Action>().
Not sure how to change it and if Action must be there as well. Any suggestion?