看到一条讲"状态机"写法的 tweet:某个状态是在几个固定的状态枚举之间轮转的话,可以用这种更好读的方式来写。
Cory House (@housecor) on X#10: State Enums are 🔥. With simple state enums, you likely don’t need XState and state charts (though they are nice).twitter.com
会写一点前端的奶爸。
看到一条讲"状态机"写法的 tweet:某个状态是在几个固定的状态枚举之间轮转的话,可以用这种更好读的方式来写。
Cory House (@housecor) on X#10: State Enums are 🔥. With simple state enums, you likely don’t need XState and state charts (though they are nice).twitter.com