import { createAsyncThunk } from '@reduxjs/toolkit'; import { useDispatch, useSelector } from 'react-redux'; import type { RootState, AppDispatch } from '../redux-modules'; export const useAppDispatch = useDispatch.withTypes(); export const useAppSelector = useSelector.withTypes(); export const createAppAsyncThunk = createAsyncThunk.withTypes<{ dispatch: AppDispatch; state: RootState }>();