Is there a shorter way to write this? (Spread object literal argument and return all its properties):
export const selectUser = ({ fullName, email, userType }) => ({
fullName,
email,
userType,
}),
);
>Solution :
Assuming (from "return all its properties") the object has exactly these 3 properties, you can:
export const selectUser = obj => ({ ...obj });