Replies: 1 comment
-
I was also struggling to figure out how to implement an application that held multiple models, until I found this example in the bubblezone codebase: https://github.com/lrstanley/bubblezone/blob/master/examples/full-lipgloss/main.go Perhaps I've missed something. It seems more simple to me than what you describe manually passing around Basically inside of the
Where Note that the
|
Beta Was this translation helpful? Give feedback.
-
So, I have a main model, and two sub models. The
main
model is basically doing nothing more than displaying the two other models (status
andcurrentTest
) in the format that I want. So far, that is working great. Now, I have in themain
model, I have the current state of the application, which includes information that the rest of the models will require. I got around this problem by passing that state as a part of atea.Cmd
message, which the two other models get. Now, thecurrentTest
model has its own state listeners, and this is where things are breaking down. For whatever reason, even though I know that the secondary sate is being sent as a message (gotta love logging), mycurrentTest
model isn't picking it up. Here is a code snippet:Also, here is the contents of my log file:
Beta Was this translation helpful? Give feedback.
All reactions