Module isolated from App

so I saw that I can include Modules inside Apps, so to keep my App simple and clear, I thought to make 2 modules, but for my bad luck, when modules where ready, I included them in my App, and I needed a simple integer, an ID, to be shared between the Module and the App, but it is imposible.

I tried storing in a Temporary State, I tried Local Storage, I tried javascript, but I was not able to share a simple ID betwen Module and App.

It is strange to have this limitation.

It seems that if there is a page reload, I can pass the ID in the URL, and Local Storage seems to work to, but I don't want to reload the page.

The purpose of what I am trying to do is simple: each module is a Form, used to search in DB and retrieve a set of results. The results are displayed in a Table and the user should pick the desired result. Each module is loaded inside a Modal, once the user picks the desired result, the Modal should close, and App should use the ID of the picked result to continue.

Unfortunately I can't even close the Modal window, because the Module is isolated from the App.

What can I do?

Hi @chucktochunk Thanks for this feedback! This use case sounds like it could be doable, but we do want to make modules easier to use within apps.

In regards to the page reloading, typically hash params do not need a page refresh, but regular url params do.

I'm hoping you can use the module output feature to solve for this. I am including a simplified version of how I'm interpreting from your question. The modal can be closed by pressing submit on the form. Can you import it & take a look? I'd like to know if I'm understanding your use case correctly so that we're on the same page about a solution

:crossed_fingers: Let me know if it seems similar!
module modal forms (2).json (38.9 KB)