koordinates / xstate-tree

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

Deprecate `inState` prop of view components #33

Closed UberMouse closed 1 year ago

UberMouse commented 1 year ago

This prop is the only prop passed to views that is tricky to type correctly when using the view directly (ex in Storybook stories or tests) as it depends on typegen information from the machine. It's also better practice to use the same inState function that is in the selectors to instead add something to the selectors to determine your conditional with in the view instead of using inState directly in the view.

In light of that, inState should be deprecated and when #14 is done the new system should not provide inState to the view.

UberMouse commented 1 year ago

Closed by https://github.com/koordinates/xstate-tree/commit/4c8ad20fc0386566ecedd82d7ddef47d33f6bfa7