Very nice, I use these a lot since I learned about it.
Object.fromEntries is pretty useful. I use it in place of [...].reduce((prev, [key, value]) => ({ ...prev, [key]: value }), {}) for much cleaner syntax and better Typescript inference :D
Funny, just yesterday I flattened an array using reduce() and I ran into Typescript issues because of the inference. Still didn't find a solution :D. But yes, these methods are super useful.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Very nice, I use these a lot since I learned about it.
Object.fromEntries
is pretty useful. I use it in place of[...].reduce((prev, [key, value]) => ({ ...prev, [key]: value }), {})
for much cleaner syntax and better Typescript inference :DFunny, just yesterday I flattened an array using reduce() and I ran into Typescript issues because of the inference. Still didn't find a solution :D. But yes, these methods are super useful.