If I need to use const variables I use this approach since it has a type safety.
export class LocalStorage {
static USER_INFO = "user-info";
static PROFILE_INFO = "profile-info";
}
But it seems we can use string enums like so:
export enum LocalStorage {
USER_INFO = "user-info";
PROFILE_INFO = "profile-info";
}
What is the difference between these 2 approaches?