The exercise is interesting in itself. But, spent quite some time wondering why it didn't work for me. The problem wasn't the state machine (in Xstate) but the JSX and how I was dealing with it.
My solution to the small inconvenience |
Later I published this experience in Twitter and got a suggestions: clsx, just a simple utility to add spaces between classes. Not useful in my case, as it is only one line but for projects that involve changing classes or adding them it certainly will be useful.
No hay comentarios:
Publicar un comentario