A new milestone in my life
Hello, my dear friends! I hope you and your families are doing well.
This update will be short.
Last weekend was my birthday. I am now 28.
I am slowly approaching the thirties club.
And I am not depressed about it (for now haha).
Tip of the week
In today's tip of the week, I want to talk about why I don't use TypeScript enums and what I use instead.
TypeScript enums implementation has many problems:
- Enums increase the size of the payload.
- They are challenging to iterate over.
- They are useless at runtime.
Here is an example:
This solution is easy to understand, simple to iterate over, and usable at runtime!
You can use the Roles type to validate types and roles to validate inputs.
I added two new articles on the axios npm library:
Thank you for reading.
See you next week!