Replies: 1 comment
-
A rough answer: in a model, you can have one or more sub-models rendered within the primary model. You can keep track of which view is displayed (or active) based on various state variables in the primary model. From there, you can use the same logic to send events and messages (or not) to the sub-models, as well as render those sub-models. I create "screens" (or sub-models) that my primary app displays based on logic in my app. These screens can be separate go files, each with its own model definition. In the In the I might have a variable called Hopefully this generalized overview helps you get started 🙏 |
Beta Was this translation helpful? Give feedback.
-
Hey,
I loved the lib and I am considering it to one project, but one thing is not clear to me.
Based on Views example where the solution was to create subviews to change the view, if we have several views won't be extreme complex to keep the logic and state in the same place?
Is there a way to change or push a new model to the program in a way that we can encapsulate the logic for this view?
Beta Was this translation helpful? Give feedback.
All reactions