DEV Community

Hashi7412
Hashi7412

Posted on

Using Map or Set is bad option in redux/toolkit?

I'm building a Redux store using Redux Toolkit and I want to store a map of users in my state, like this:

export type UserType = {
  _id: string
  firstName: string
  lastName: string;
  email: string;
};

interface UserStoreType {
  users: Map<string, UserType> 
}

const initialState: UserStoreType = {
  users: new

Top comments (0)