profile
viewpoint

Ask questionsArray conditions

Bug or feature request?

Feature request

Description:

Would be neat if cond could accept array of guards, without this I have to make multiple transient states when my logic is more complex.

(Feature) Potential implementation:

It's not a breaking change and the API would be something like this:

'': [
    { target: 'foo', cond: ['isOnline', 'hasForm'] }
]
davidkpiano/xstate

Answer questions cybervaldez

Good point. I'll implement it - it's on the roadmap.

Any chance this would also show up for the choose action? choose([{ cond: ['cond1', 'cond2'] }, ... ])

useful!

Related questions

[Feature] Spawning Actors hot 1
source:https://uonfu.com/
Github User Rank List