koordinates / xstate-tree

Build UIs with Actors using xstate and React
MIT License
82 stars 6 forks source link

feat(xstate): update builders to use typegen states #10

Closed UberMouse closed 1 year ago

UberMouse commented 1 year ago

Currently, the only way of specifying states is via type states, which are not used with typegen.

This means that the argument for inState ends up being any which is not great.

This commit updates the builder functions to extract the typegen'd states from the supplied state machine if it is using typegen, reverting to type states otherwise.

So now the inState arguments to the selectors/views will now be typegen aware.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.3.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: