Appsilon / shiny.router

A minimalistic router for your Shiny apps.
http://appsilon.github.io/shiny.router
Other
255 stars 31 forks source link

Using shiny.router with separate ui and server files #80

Open em-dataIntegrityEnthusiast opened 3 years ago

em-dataIntegrityEnthusiast commented 3 years ago

Is it possible to use shiny.router with separate ui and server files? I could not figure out how you would get the scoping right on that. Defining the router object in UI would make it not accessible in server and global.R did not seem to help that either.

rstammer commented 3 years ago

Yes, in general that is possible! Here is an older example that follows a little bit your idea, if I got it right. The example has multiple uis in the uis folder, a common router object in routes.R. Please note that the example code referenced above is quite outdated and would need some dev love, but the idea should work nevertheless.