koordinates / xstate-tree

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

feat(slots): better multiSlot handling #32

Closed UberMouse closed 1 year ago

UberMouse commented 1 year ago

Multi slots were not a heavily used feature (only used twice in the Koordinates codebase) so they never got a lot of love

The original design of them made a poor decision to determine if a slot in the view represented a single or multi slot by whether it ended in "s"

This had the unfortunate side-effect of tripping people up when they used a plural for a single slot or had a singular word that ends in s.

To solve that foot gun, the names of a multi slot have "Multi" appended to them now and that is how the view determines which slot type the slot is. This has a much lower chance of an accidental collision and has the added benefit of making it easy to determine what the slot type is from looking at the view

BREAKING CHANGE: multi slot names in views have changed

github-actions[bot] commented 1 year ago

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

The release is available on:

Your semantic-release bot :package::rocket: