Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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

152,349 Aufrufe • vor 1 Jahr •via X (Twitter)

8 Kommentare

Profilbild von statuscast
statuscastvor 2 Jahren

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.

Profilbild von Roushou (e/acc)
Roushou (e/acc)vor 1 Jahr

Even better to use a union string

Profilbild von FullStackIzzy
FullStackIzzyvor 1 Jahr

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

Profilbild von Marcelo Terreiro
Marcelo Terreirovor 1 Jahr

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

Profilbild von Alexandru Corut
Alexandru Corutvor 1 Jahr

Nice, but what’s the error.message?

Profilbild von Pavel Romanov
Pavel Romanovvor 1 Jahr

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.

Profilbild von Alessandro
Alessandrovor 1 Jahr

It's not enum

Profilbild von Dika
Dikavor 1 Jahr

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

Ähnliche Videos