Loading shiny module only when menu items is clicked

Hi,

I try to load my shiny modules only when menu items is clicked because of performance issues, I have large tables in different tabs. I found this answer on stackoverflow

Highest score answer is working but if user select another page and come back it runs all module again as expected.

As far as I see, If I use render functions in module, those render functions are running only when menu item is clicked. But reactive functions or loading static data functions working when module is called and I'm using those same reactive objects in several render functions.

So first option is rendering all module again and again and second is loading same data in render functions again and again.

What is the "best" way for it? Maybe async programming?

Thanks

I left a modified version of my earlier answer here, which runs callModule only once on the first click.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.