-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to use shiny.router with moduleServer? #91
Comments
Hello @zilch42, thanks for reaching out! If I recall correctly there's no documentation on how to use
In
which hints us that we can use ellipsis to pass arguments to server functions. We just need to make those arguments names unique, that's why I've used Does this example help you solve your issue? |
Thanks @jakubsob. I've applied that method to my app and it works so that's great. I haven't noticed any change in behaviour though. The app still seems to load all pages initially not just the page being viewed, and if I change a reactive value (eg a data filter) that affects other pages they all recalculate at once regardless of which page is currently being viewed. Is that currently still expected behaviour? That's what I was hoping this method would solve |
It may be a while after the creation of this issue but I would like to second it. Is shiny.router still supported/developed? Appsilon/rhino for example proposes the use of |
Hi @FMKerckhof, We'll try to reinvestigate this issue and come back with a solution |
Hi @jakubsob , Thanks for your clarifications especially with respect to feature development. In the package description you do however mention to make it possible tocustomize loading full session or just visible part in the future. That is a big topic I am struggling with because I usually create dashboards that do have database queries but also use global variables. So, these change the full session and all the queries get refreshed. You guys have a solution for that in your backpack? Best |
Related (modules rhino router): https://github.com/Appsilon/NLPShiny/blob/main/app/layouts/pages.R without rhino: https://github.com/Appsilon/possible_example |
hi there,
I have a reasonably large app using shiny.fluent and shiny.router (thanks for these packages they are really great), with a structure similar to the code below:
Each of my pages are inside modules because they are quite similar and it helps me avoid namespace conflicts.
Notice that my page servers are just in the main server function, not in the router.
This works okay, but suffers from the issue of every page reloading when something changes, not just the current page ( #70). From what I understand from reading other issues, this issue has been fixed in the current version of shiny.router, but requires calling the page server from the router - ie. using
route(path, ui, server = ACTUAL_SERVER_FUNCTION)
. Is that correct?I can only get that to work if the pages are not modules that use moduleServer(). Is there any way to get
route
to work with modules? And is there any way to pass parameters (e.g. a set of reactive values) to those server modules if it does work?Cheers
The text was updated successfully, but these errors were encountered: