Loading video...

Video Failed to Load

Go Home

❌ Avoid multiple state variables to track status. ✅ Instead use enums.

152,253 views • 1 year ago •via X (Twitter)

8 Comments

statuscast's profile picture
statuscast2 years ago

Help your IT team cut through 'Are you down?' clutter with StatusCast’s Audience Specific Status Pages. Tailor your status page to each user's role and needs for effective incident communication.

Roushou (e/acc)'s profile picture
Roushou (e/acc)1 year ago

Even better to use a union string

FullStackIzzy's profile picture
FullStackIzzy1 year ago

George, I definitely need to try your implementation. Because this can't be life. I apologize for my code below🤦‍♂️:

Marcelo Terreiro's profile picture
Marcelo Terreiro1 year ago

Holy crap don’t do this. Why enums if you can you a string literal lol

Alexandru Corut's profile picture
Alexandru Corut1 year ago

Nice, but what’s the error.message?

Pavel Romanov's profile picture
Pavel Romanov1 year ago

If it is only possible to have one of the states at a time, then it is a way to go 👌 It's also much easier to work with a single state than with all those boolean logic conditions mixed into the component.

Alessandro's profile picture
Alessandro1 year ago

It's not enum

Dika's profile picture
Dika1 year ago

It only records status, how do you save the value of error message?

Related Videos