After revisiting the documentation, I came across the following recommendation in the Best Practices section:
Minimize hidden components: Avoid creating a module with a large number of hidden components. Hidden components must still be rendered and can have an impact on app performance.
This raised a few questions. What exactly is meant by “hidden components”? Given the nature of modules—which are often conditionally rendered—I would argue that, by default, components are hidden unless explicitly invoked. So I’m curious how this guideline should be interpreted in that context.
In our case, we’re using modules to structure detail forms. These forms can include 60+ fields and typically span around six tabs. While each module has associated queries, we disable those unless the module is actively loaded (which, frankly, feels like something that ought to be supported natively—but I digress).
What I’m trying to understand is whether the number of components alone can impact performance—even if they’re not visible. We noticed that, after importing all the various modules into our app, the browser nearly crashed while editing. That experience made me question whether the modular approach is actually helping or hurting us.
If there is some limit to the amount of components, and by extension modules, then I am curious to know if modules are still serving any value when it comes to decentralizing UI and logic.
As a workaround, we’ve started loading modules in an iFrame, swapping out the URL contextually. This gives us asynchronous loading and a cleaner separation of concerns, but it does feel like a workaround rather than a long-term solution - it has several drawbacks, which I won't get into now.
One open question: we’re using the URL’s hash fragment to help differentiate between the primary key value. Could that part (i.e. the hashtag) be causing issues? For instance, could it be possible this is triggering some kind of unintended re-render loop?
Any thoughts or insights would be greatly appreciated—we're currently at a crossroads and struggling to determine the most scalable architectural approach.