-
I was looking through the examples provided, and noticed that to access any data/callbacks/properties (anything), you need to bubble it up to the main window, where then you can access it from the rust side. In the relatively narrow use case of singleton components that are relatively shallow in the component tree, I would agree that this makes sense. I am trying to imagine a larger project, with not only breadth but also depth of components in the tree, and how having many "adapters" all being handled in the main.rs file is especially antithetical to component based UIs. Looking at React for example, there exists a very tight interaction between the UI data and the native language (JS) in each component, while still preserving declarative UI (HTML). Is this part of the design of the language? What is the mental model to reason about this data model? If there isn't, Is there plans to improve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes, this is currently how Slint work. You need to have all access through the root or through a
Yes, we're looking into solution such as #2031 |
Beta Was this translation helpful? Give feedback.
Yes, this is currently how Slint work. You need to have all access through the root or through a
global
.For bigger project you usually have a
global
for the logic for some component. The callback can take an id argument so that the logic can distinguish between instance.Yes, we're looking into solution such as #2031