Загрузка видео...

Не удалось загрузить видео

На главную

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

152,349 просмотров • 1 год назад •via X (Twitter)

Комментарии: 8

Фото профиля statuscast
statuscast2 лет назад

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)
Roushou (e/acc)1 год назад

Even better to use a union string

Фото профиля FullStackIzzy
FullStackIzzy1 год назад

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

Фото профиля Marcelo Terreiro
Marcelo Terreiro1 год назад

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

Фото профиля Alexandru Corut
Alexandru Corut1 год назад

Nice, but what’s the error.message?

Фото профиля Pavel Romanov
Pavel Romanov1 год назад

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
Alessandro1 год назад

It's not enum

Фото профиля Dika
Dika1 год назад

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

Похожие видео