I am passing a value from my redux store to a function
itnerface SelectedProps {
[key: string]: {
date: number,
bar: string[]
}
}
type FooState = {
selected: SelectedProps
};
const initialState: FooState = {selected: {}}
export const giftSlice = createSlice({
name: 'whatever',
initialState,
reducers: {
thisIsAnAction: (state, action: PayloadAction<string>) => {
const thisGivesMeTheProxyObject = state.foo[action.key].bar
console.log(thisGivesMeTheProxyObject)
}
}
})
Proxy { : (1) […], : {…} }
What is this Proxy
object, and why is it not an array?