trexitycode / wirestate

MIT License
1 stars 0 forks source link

Discussion: ability to @use without having an extra container state #18

Open matb33 opened 4 years ago

matb33 commented 4 years ago

When we break up our wirestate files into separate machines, we're forced to create extra containers that don't serve a purpose, and in fact they end up cluttering the state tree which can make debugging a bit more cumbersome.

Example:

        Toast
          @use "Toast"

        Watch Position
          @use "Watch Position"

        Driver Active Status
          @use "Driver Active Status"

        Update New And Snoozed Shipments
          @use "Update New And Snoozed Shipments"

        Shipment Details Overlay
          @use "Shipment Details Overlay"

We end up with duplicate "Toast" and "Toast", "Watch Position" and "Watch Position", etc and so on, adding extra depth in the tree when none is needed.

Ideally we could simply do:

        @use "Toast"
        @use "Watch Position"
        @use "Driver Active Status"
        @use "Update New And Snoozed Shipments"
        @use "Shipment Details Overlay"