Modules Vs. Global Scope in the age of multipage

With the introduction of multipage functionality, I’m struggling to create a mental model for when to use modules versus globally scoped modals or sidebars.

Previously, I thought modules were ideal for things like navigation components, CRUD operations used across multiple sections of the app, or occasional sidebars with fully-fledged helper widgets. But with the introduction of global scope, it feels like many of these use cases could now be better suited to global scope instead of modules.

At this point, the only clear use case I see for modules is in larger organizations with hundreds of apps, where different user personas need consistent functionality across multiple applications. However, I’m unsure if modules are still relevant for smaller setups with fewer apps and more limited Retool use cases.

I’m curious if anyone has any other thoughts thoughts or mental models on when modules make the most sense in app design.

2 Likes

I had similar thoughts this last week while developing a new app that uses a multipage setup (rather than converting an existing app to this format). I'm struggling to see when I would ever need to use Modules again.
I'm not too sad about this :smiley:

2 Likes

I am currently working on a concept for my app to enable it to connect to different stages of my backend. There is a proposal in the forum that says: copy your app for each stage. But that's to much of a hassle for me to handle (or at least I think this would be the case). So I would rather use modules there and modify them where ever the stages really differ. This way, i should be able to keep the changes small and close to their root causes

Thanks for facilitating this conversation! Just wanted to chime in with a couple notes

We have a small excerpt about this in our docs: Build modules to reuse queries and components | Retool Docs. Generally, we anticipate less module usage as folks adopt multipage.

I also want to highlight this quote from another community post:

  • Heavy use of modules may impact performance in both single and multipage apps.

Agree - Module implementation is rough and has issues due to all the page listening. I still think there is a rare use-case that makes sense.

Good to know everyone else is on the same page of decreasing use for multipage.

Good points here. I just posted a similar question.

If anyone wants to chime in on my question I would be grateful.