In my application, with a layout inspired of the spa-example app 1, I have some pages I would like to split up even more, and hence create submodules of that page (nested submodules). I use ports to create graphs and charts with echart 2, and while I can call them from the a page that is a submodule of Main, calls to the ports from a nested submodule do not seem to be registered.
E.g. I have a page “Overview”, where the user can switch between different “tabs” or subpages that has different graphs or tables. Each of these I have put in its own module. So I can call the port and render a graph directly from the Overview-module, but not from one of its children.
As I am pretty new with ports, I assume I have misunderstood or overlooked something, but I haven’t manage to figure out what. Is there a special way to reference a port from a nested submodule?
Ports will return Cmds, which must be returned from update (or init). If you don’t return the Cmd, it won’t actually do anything. My first thought is the Cmd is getting created but then thrown away.
We can be a lot more specific if you link your code!
When i call it from Overview, the Cmd is registered in the Main’s update. But when I call if from the subpage, it isn’t registered in the parent’s update.