Closed telekid closed 1 year ago
In your example the system can only handle multiple panes if they are in an array. In that case the path to them will be
Container/0/Pane Container/1/Pane
You might not want an array, but in that case its easier to just keep everything in the same component. Remember that you can still separate out the UI components into ordinary functions etc. Does that answer the question?
@telekid sorry for the initial delay in answering, I'm keen to help make ctmx clearer and would appreciate your feedback.
I think it does, yeah. Closing for now, will reopen if I run into this need a few more times.
How do you idiomatically handle components that appear as siblings in the stack? For example, if you have a
Container
component and aPane
component, and you want the container component to have two panes, what would you do to uniquely identify each pane?I can see how you might hack around with
map-indexed
, but you can imagine situations where e.g. thePane
components are separated by something between them irregularly – that is, they aren't in a repeating pattern.