DEV Community

loading...

Discussion on: Status instead of isLoading boolean?

larsejaas profile image
LarsEjaas

That's actually a great point! I haven't used Boolean(..) in my code I think 🤔 But I like how it's more descriptive! Thanks for taking the time to responde 😊👍

Thread Thread
sleeplessbyte profile image
Derk-Jan Karrenbeld

The _callable Global Objects are a gem ✨.

I also recommend Number(value) over the obscure +value, which both are usually better to "type-cast" than parseInt or parseFloat, as it will properly fail when the value isn't representing a number, instead of doing something unexpected.

Thread Thread
larsejaas profile image
LarsEjaas

Ahh, cool. I haven't digged super deeply into the differences, I just really like "Number" because "it does what it says on the tin" 😆 I really like easy readable code 😊

Forem Open with the Forem app