Got this error:
Property 'authnUser' does not exist on type 'TypedUseSelectorHook<RootState>'.
I try export like this:
export const authnUser = (state: TypedUseSelectorHook<RootState>) =>
state.authnUser
I have following declarations:
interface RootState {
authnResp: AuthnRes
soldTickets: SoldTicketRes
}
const initialState: RootState = {
authnResp: null,
soldTickets: null,
}
const tikexAPI = createSlice({
name: 'authnUser',
initialState,
reducers: {
setAuthnRes(state, action: PayloadAction<AuthnRes | null>) {
state.authnResp = action.payload
},
},